Skip to content

Commit 633a91b

Browse files
committed
Well since xUnit throws that's a bad idea...let's take another approach.
1 parent 859bbaf commit 633a91b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

StackExchange.Redis.Tests/Locking.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public void AggressiveParallel(TestMode testMode)
3131
{
3232
int count = 2;
3333
int errorCount = 0;
34+
int bgErrorCount = 0;
3435
var evt = new ManualResetEvent(false);
3536
using (var c1 = Create(testMode))
3637
using (var c2 = Create(testMode))
@@ -49,9 +50,9 @@ void cb(object obj)
4950
conn.Ping();
5051
if (Interlocked.Decrement(ref count) == 0) evt.Set();
5152
}
52-
catch (Exception ex)
53+
catch
5354
{
54-
Assert.True(false, "Exception in AggressiveParallel callback: " + ex.Message);
55+
Interlocked.Increment(ref bgErrorCount);
5556
}
5657
}
5758
int db = testMode == TestMode.Twemproxy ? 0 : 2;
@@ -60,6 +61,7 @@ void cb(object obj)
6061
evt.WaitOne(8000);
6162
}
6263
Assert.Equal(0, Interlocked.CompareExchange(ref errorCount, 0, 0));
64+
Assert.Equal(0, bgErrorCount);
6365
}
6466

6567
[Fact]

0 commit comments

Comments
 (0)