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)
3737 {
3838 void cb ( object obj )
3939 {
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 ) ; } ;
4244
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 )
4453 {
45- conn . LockTakeAsync ( "abc" , "def" , TimeSpan . FromSeconds ( 5 ) ) ;
54+ Assert . True ( false , "Exception in AggressiveParallel callback: " + ex . Message ) ;
4655 }
47- conn . Ping ( ) ;
48- if ( Interlocked . Decrement ( ref count ) == 0 ) evt . Set ( ) ;
4956 }
5057 int db = testMode == TestMode . Twemproxy ? 0 : 2 ;
5158 ThreadPool . QueueUserWorkItem ( cb , c1 . GetDatabase ( db ) ) ;
You can’t perform that action at this time.
0 commit comments