Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Products
/
VSTT-Plugins
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Issues
2
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
b3c9820c
...
b3c9820cdc0810e8ddfadc75dfdea58e64337431
authored
2018-04-23 14:42:42 +0200
by
Christian Gerdes
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
ClearSSLSessions now takes a regex to match agents.
1 parent
d3bc1be6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
LIL_VSTT_Plugins/LoadTestPlugins.cs
LIL_VSTT_Plugins/LoadTestPlugins.cs
View file @
b3c9820
...
...
@@ -18,6 +18,7 @@ using System.ComponentModel;
using
System.IO
;
using
System.Collections.Specialized
;
using
System.Net
;
using
System.Text.RegularExpressions
;
namespace
LIL_VSTT_Plugins
{
...
...
@@ -28,8 +29,27 @@ namespace LIL_VSTT_Plugins
[
Description
(
"(C) Copyright 2018 LIGHTS IN LINE AB\r\nDisables SSL Session Cache and Reuse of handshakes during this loadtest. Beta."
)]
public
class
ClearSSLSessions
:
ILoadTestPlugin
{
[
DisplayName
(
"Agents RegEx"
)]
[
Description
(
"The regular expression must match the Agent Name if specified. Empty matches all agents."
)]
[
DefaultValue
(
""
)]
public
string
AgentRegEx
{
get
;
set
;
}
public
void
Initialize
(
LoadTest
loadTest
)
{
if
(!
String
.
IsNullOrEmpty
(
AgentRegEx
))
{
Regex
r
=
new
Regex
(
AgentRegEx
);
if
(!
r
.
IsMatch
(
loadTest
.
Context
.
AgentName
))
{
// Just in case, run undoIt() restoring default behaviour
loadTest
.
LoadTestStarting
+=
new
EventHandler
(
mLoadTest_Finished
);
return
;
}
}
// If we get here, either the agent matches, or no regex has been given so we run on all agents.
loadTest
.
LoadTestStarting
+=
new
EventHandler
(
mLoadTest_Starting
);
loadTest
.
LoadTestFinished
+=
new
EventHandler
(
mLoadTest_Finished
);
loadTest
.
LoadTestAborted
+=
new
EventHandler
<
LoadTestAbortedEventArgs
>(
mLoadTest_Aborted
);
...
...
Please
register
or
sign in
to post a comment