diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2023-09-22 14:49:04 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2023-09-22 14:49:04 -0400 |
commit | bc4df0efae2713e189847db7273234d4c8f518aa (patch) | |
tree | 312d38ba979a527129f6527a94dfa9819b1f1626 /indra/test/io.cpp | |
parent | 4a8a550c02020c0fccf02ab4d8e2a9fd17a72069 (diff) |
DRTVWR-589: Make pump&pipe fitness tests less timing sensitive.
Diffstat (limited to 'indra/test/io.cpp')
-rw-r--r-- | indra/test/io.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/indra/test/io.cpp b/indra/test/io.cpp index 40243a8ad6..83e45661f8 100644 --- a/indra/test/io.cpp +++ b/indra/test/io.cpp @@ -1156,20 +1156,29 @@ namespace tut chain.clear(); // pump for a bit and make sure all 3 chains are running - pump_loop(mPump,0.1f); + for (int retry = 0; mPump->runningChains() < 3 && retry < 10; ++retry) + { + pump_loop(mPump, 0.1f); + } count = mPump->runningChains(); - // ensure_equals("client chain onboard", count, 3); commented out because it fails frequently - appears to be timing sensitive + ensure_equals("client chain onboard", count, 3); LL_DEBUGS() << "** request should have been sent." << LL_ENDL; // pump for long enough the the client socket closes, and the // server socket should not be closed yet. - pump_loop(mPump,0.2f); + for (int retry = 0; mPump->runningChains() == 3 && retry < 10; ++retry) + { + pump_loop(mPump, 0.1f); + } count = mPump->runningChains(); ensure_equals("client chain timed out ", count, 2); LL_DEBUGS() << "** client chain should be closed." << LL_ENDL; // At this point, the socket should be closed by the timeout - pump_loop(mPump,1.0f); + for (int retry = 0; mPump->runningChains() > 1 && retry < 10; ++retry) + { + pump_loop(mPump, 0.1f); + } count = mPump->runningChains(); ensure_equals("accepted socked close", count, 1); LL_DEBUGS() << "** Sleeper should have timed out.." << LL_ENDL; |