Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Feb 6, 2022. It is now read-only.

Commit 533d69c

Browse files
committed
Remove possible race condition from test code
1 parent 0179e46 commit 533d69c

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/test/java/dnode/DNodeTest.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ public void call(Object... args) {
7474
}
7575
}
7676
});
77-
thread.start();
7877
synchronized (signals) {
78+
thread.start();
7979
signals.wait();
8080
}
8181
}
@@ -94,8 +94,7 @@ private String runClient(String method) throws IOException, InterruptedException
9494
int exit = client.waitFor();
9595
if (exit != 0)
9696
throw new AssertionFailedError("Exit value from external process was " + exit +
97-
" (with stdout/stderr: " + result + ")");
97+
" (with stdout/stderr: " + result + ")");
9898
return result.toString();
9999
}
100-
101100
}

0 commit comments

Comments
 (0)