Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
StackExchange.Redis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
StackExchange.Redis
Commits
859bbafe
Commit
859bbafe
authored
Apr 03, 2018
by
Nick Craver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tests: prevent Locking tests from killing the runner.
This takes out the global build if it throws...let's not do that.
parent
90e16598
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
Locking.cs
StackExchange.Redis.Tests/Locking.cs
+13
-6
No files found.
StackExchange.Redis.Tests/Locking.cs
View file @
859bbafe
...
...
@@ -37,15 +37,22 @@ public void AggressiveParallel(TestMode testMode)
{
void
cb
(
object
obj
)
{
var
conn
=
(
IDatabase
)
obj
;
conn
.
Multiplexer
.
ErrorMessage
+=
delegate
{
Interlocked
.
Increment
(
ref
errorCount
);
};
try
{
var
conn
=
(
IDatabase
)
obj
;
conn
.
Multiplexer
.
ErrorMessage
+=
delegate
{
Interlocked
.
Increment
(
ref
errorCount
);
};
for
(
int
i
=
0
;
i
<
1000
;
i
++)
for
(
int
i
=
0
;
i
<
1000
;
i
++)
{
conn
.
LockTakeAsync
(
"abc"
,
"def"
,
TimeSpan
.
FromSeconds
(
5
));
}
conn
.
Ping
();
if
(
Interlocked
.
Decrement
(
ref
count
)
==
0
)
evt
.
Set
();
}
catch
(
Exception
ex
)
{
conn
.
LockTakeAsync
(
"abc"
,
"def"
,
TimeSpan
.
FromSeconds
(
5
)
);
Assert
.
True
(
false
,
"Exception in AggressiveParallel callback: "
+
ex
.
Message
);
}
conn
.
Ping
();
if
(
Interlocked
.
Decrement
(
ref
count
)
==
0
)
evt
.
Set
();
}
int
db
=
testMode
==
TestMode
.
Twemproxy
?
0
:
2
;
ThreadPool
.
QueueUserWorkItem
(
cb
,
c1
.
GetDatabase
(
db
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment