Skip to content

Commit

Permalink
fix(tests): another attempt at fixing the flaky testSendFile*()
Browse files Browse the repository at this point in the history
  • Loading branch information
obiltschnig committed Feb 8, 2025
1 parent db88e0e commit 47a7775
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Net/testsuite/src/SocketTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,7 @@ void SocketTest::testSendFile()
istr.close();
ss.close();

Poco::Thread::sleep(200);
while (srv.currentConnections() > 0)
{
Poco::Thread::sleep(100);
Expand Down Expand Up @@ -789,6 +790,7 @@ void SocketTest::testSendFileLarge()
istr.close();
ss.close();

Poco::Thread::sleep(200);
while (srv.currentConnections() > 0)
{
Poco::Thread::sleep(100);
Expand Down Expand Up @@ -830,6 +832,7 @@ void SocketTest::testSendFileRange()
istr.close();
ss.close();

Poco::Thread::sleep(200);
while (srv.currentConnections() > 0)
{
Poco::Thread::sleep(100);
Expand Down
3 changes: 3 additions & 0 deletions NetSSL_OpenSSL/testsuite/src/SecureStreamSocketTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ void SecureStreamSocketTest::testSendFile()
istr.close();
ss.close();

Poco::Thread::sleep(200);
while (srv.currentConnections() > 0)
{
Poco::Thread::sleep(100);
Expand Down Expand Up @@ -312,6 +313,7 @@ void SecureStreamSocketTest::testSendFileLarge()
istr.close();
ss.close();

Poco::Thread::sleep(200);
while (srv.currentConnections() > 0)
{
Poco::Thread::sleep(100);
Expand Down Expand Up @@ -353,6 +355,7 @@ void SecureStreamSocketTest::testSendFileRange()
istr.close();
ss.close();

Poco::Thread::sleep(200);
while (srv.currentConnections() > 0)
{
Poco::Thread::sleep(100);
Expand Down

0 comments on commit 47a7775

Please sign in to comment.