Commit 633a91bd authored by Nick Craver's avatar Nick Craver

Well since xUnit throws that's a bad idea...let's take another approach.

parent 859bbafe
......@@ -31,6 +31,7 @@ public void AggressiveParallel(TestMode testMode)
{
int count = 2;
int errorCount = 0;
int bgErrorCount = 0;
var evt = new ManualResetEvent(false);
using (var c1 = Create(testMode))
using (var c2 = Create(testMode))
......@@ -49,9 +50,9 @@ void cb(object obj)
conn.Ping();
if (Interlocked.Decrement(ref count) == 0) evt.Set();
}
catch (Exception ex)
catch
{
Assert.True(false, "Exception in AggressiveParallel callback: " + ex.Message);
Interlocked.Increment(ref bgErrorCount);
}
}
int db = testMode == TestMode.Twemproxy ? 0 : 2;
......@@ -60,6 +61,7 @@ void cb(object obj)
evt.WaitOne(8000);
}
Assert.Equal(0, Interlocked.CompareExchange(ref errorCount, 0, 0));
Assert.Equal(0, bgErrorCount);
}
[Fact]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment