Skip to content

Commit

Permalink
Increase sleeps in TestFixture.cs to avoid test failures
Browse files Browse the repository at this point in the history
Those parts of the test seem to test the ability of the connection pool to shrink back. My reading of the code is that the connection pool may keep connections for up to 10 seconds and that checks for idleness are only performed once every 1 second.
  • Loading branch information
philip-stoev authored Jul 17, 2018
1 parent e5823eb commit efc2555
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions NUnitTestProject/TestFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1399,7 +1399,7 @@ public void TestConnectionPooling()
pooledItems = NuoDbConnection.GetPooledConnectionCount(cnn);
Assert.AreEqual(2, pooledItems);

Thread.Sleep(3000);
Thread.Sleep(13000);

// 1 busy
pooledItems = NuoDbConnection.GetPooledConnectionCount(cnn);
Expand All @@ -1423,7 +1423,7 @@ public void TestConnectionPooling()
pooledItems = NuoDbConnection.GetPooledConnectionCount(newConnString);
Assert.AreEqual(1, pooledItems);

Thread.Sleep(3000);
Thread.Sleep(13000);

// empty pool
pooledItems = NuoDbConnection.GetPooledConnectionCount(newConnString);
Expand Down

0 comments on commit efc2555

Please sign in to comment.