Skip to content

Commit

Permalink
test: ThroughputTest: poll with timeout
Browse files Browse the repository at this point in the history
This prevents spurious timeout exceptions on very slow systems (e.g.,
s390x emulation)
  • Loading branch information
kohlschuetter committed Feb 14, 2024
1 parent b923dad commit ed0488b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ public void run() {
while (!Thread.interrupted() && keepRunning.get() && !bytesRead.isCancelled()) {
int read;
if (readSelector != null) {
int numReady = readSelector.select();
int numReady = readSelector.select(1000);
if (numReady == 0) {
continue;
}
Expand Down Expand Up @@ -590,7 +590,7 @@ public void run() {
}
while (keepRunning.get()) {
if (writeSelector != null) {
int numReady = writeSelector.select();
int numReady = writeSelector.select(1000);
if (numReady == 0) {
continue;
}
Expand Down

0 comments on commit ed0488b

Please sign in to comment.