Skip to content

Commit

Permalink
Fix Ice/maxConnection test failures (#3135)
Browse files Browse the repository at this point in the history
  • Loading branch information
pepone authored Nov 12, 2024
1 parent d71ced7 commit c2f5cd1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
5 changes: 5 additions & 0 deletions cpp/test/Ice/maxConnections/AllTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ testCreateConnectionsWithMaxAndRecovery(TestIntfPrx p, int max, function<void()>
{
postCloseDelay();
}
else
{
// We need to wait a tiny bit to let the server remove the connection from its incoming connection factory.
this_thread::sleep_for(10ms);
}

// Try again
try
Expand Down
3 changes: 1 addition & 2 deletions csharp/test/Ice/maxConnections/AllTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,7 @@ private static async Task testCreateConnectionsWithMaxAndRecovery(
}
else
{
// We need to wait a tiny bit to let the server remove the connection from its incoming connection
// factory.
// We need to wait a tiny bit to let the server remove the connection from its incoming connection factory.
await Task.Delay(TimeSpan.FromMilliseconds(10));
}

Expand Down
8 changes: 8 additions & 0 deletions java/test/src/main/java/test/Ice/maxConnections/AllTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,14 @@ private static void testCreateConnectionsWithMaxAndRecovery(

if (postCloseDelay != null) {
postCloseDelay.run();
} else {
// We need to wait a tiny bit to let the server remove the connection from its incoming
// connection factory.
try {
Thread.sleep(10);
} catch (InterruptedException ex) {
// ignore
}
}

// Try again
Expand Down

0 comments on commit c2f5cd1

Please sign in to comment.