File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed
StackExchange.Redis.Tests Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -37,15 +37,22 @@ public void AggressiveParallel(TestMode testMode)
37
37
{
38
38
void cb ( object obj )
39
39
{
40
- var conn = ( IDatabase ) obj ;
41
- conn . Multiplexer . ErrorMessage += delegate { Interlocked . Increment ( ref errorCount ) ; } ;
40
+ try
41
+ {
42
+ var conn = ( IDatabase ) obj ;
43
+ conn . Multiplexer . ErrorMessage += delegate { Interlocked . Increment ( ref errorCount ) ; } ;
42
44
43
- for ( int i = 0 ; i < 1000 ; i ++ )
45
+ for ( int i = 0 ; i < 1000 ; i ++ )
46
+ {
47
+ conn . LockTakeAsync ( "abc" , "def" , TimeSpan . FromSeconds ( 5 ) ) ;
48
+ }
49
+ conn . Ping ( ) ;
50
+ if ( Interlocked . Decrement ( ref count ) == 0 ) evt . Set ( ) ;
51
+ }
52
+ catch ( Exception ex )
44
53
{
45
- conn . LockTakeAsync ( "abc" , "def" , TimeSpan . FromSeconds ( 5 ) ) ;
54
+ Assert . True ( false , "Exception in AggressiveParallel callback: " + ex . Message ) ;
46
55
}
47
- conn . Ping ( ) ;
48
- if ( Interlocked . Decrement ( ref count ) == 0 ) evt . Set ( ) ;
49
56
}
50
57
int db = testMode == TestMode . Twemproxy ? 0 : 2 ;
51
58
ThreadPool . QueueUserWorkItem ( cb , c1 . GetDatabase ( db ) ) ;
You can’t perform that action at this time.
0 commit comments