Skip to content

Commit

Permalink
Merge pull request #25 from eed3si9n/wip/sleep
Browse files Browse the repository at this point in the history
Sleep longer to fix DuplexTest
  • Loading branch information
eed3si9n authored Jun 26, 2022
2 parents 7b97350 + 8477cd6 commit 44ee3a7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public void startAndAwait() {
pool.execute(sender);
pool.execute(receiver);

Thread.sleep(sendMessages * 1000);
Thread.sleep(30 * 1000);
pool.shutdownNow();
} catch (InterruptedException | IOException e) {
e.printStackTrace();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public void startAndAwait() {
pool.execute(sender);
pool.execute(receiver);

Thread.sleep((sendMessages + 2) * 1000);
Thread.sleep(30 * 1000);
pool.shutdownNow();
} catch (InterruptedException | IOException e) {
e.printStackTrace();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public void testDuplexCommunication() throws Exception {
pool.execute(() -> client.startAndAwait());

// wait client and server to terminate
Thread.sleep((Math.max(serverSendMessages, clientSendMessages) + 1) * 1000);
Thread.sleep((Math.max(serverSendMessages, clientSendMessages) + 3) * 1000);
pool.shutdown();

assertEquals(serverSendMessages, client.receiver.receivedMessages);
Expand Down

0 comments on commit 44ee3a7

Please sign in to comment.