Commit 859bbafe authored by Nick Craver's avatar Nick Craver

Tests: prevent Locking tests from killing the runner.

This takes out the global build if it throws...let's not do that.
parent 90e16598
......@@ -36,6 +36,8 @@ public void AggressiveParallel(TestMode testMode)
using (var c2 = Create(testMode))
{
void cb(object obj)
{
try
{
var conn = (IDatabase)obj;
conn.Multiplexer.ErrorMessage += delegate { Interlocked.Increment(ref errorCount); };
......@@ -47,6 +49,11 @@ void cb(object obj)
conn.Ping();
if (Interlocked.Decrement(ref count) == 0) evt.Set();
}
catch (Exception ex)
{
Assert.True(false, "Exception in AggressiveParallel callback: " + ex.Message);
}
}
int db = testMode == TestMode.Twemproxy ? 0 : 2;
ThreadPool.QueueUserWorkItem(cb, c1.GetDatabase(db));
ThreadPool.QueueUserWorkItem(cb, c2.GetDatabase(db));
......
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