Skip to content

Commit 072bc65

Browse files
committed
test: fix race condition
Join the generator thread in order to make sure it fully finished before trying to read the values from it. Signed-off-by: Jean-Louis Dupond <jean-louis@dupond.be>
1 parent d3a021c commit 072bc65

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎client/src/test/java/org/ovirt/vdsm/jsonrpc/client/events/EventsThroughputTestCase.java‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ public void testThroughput() {
7171
Thread generator = new Thread(gen);
7272
generator.start();
7373
gen.stop(TIMEOUT);
74+
try {
75+
generator.join();
76+
} catch (InterruptedException ignored) {
77+
}
7478
unsubscribe();
7579
}
7680
System.out.println("Min value " + Collections.min(this.result));

0 commit comments

Comments
 (0)