Skip to content

Commit 7b179a5

Browse files
committed
At least now I'll get a sense of what's happening on Travis
1 parent dea2016 commit 7b179a5

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

src/test/java/com/jnape/palatable/lambda/io/IOTest.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -348,31 +348,31 @@ public void monitorSync() throws InterruptedException {
348348
CountDownLatch oneStarted = new CountDownLatch(1);
349349
CountDownLatch finishLine = new CountDownLatch(2);
350350

351-
IO<Unit> one = io(() -> {
351+
IO<Unit> one = IO.monitorSync(lock, io(() -> {
352352
accesses.add("one entered");
353353
oneStarted.countDown();
354354
Thread.sleep(10);
355355
accesses.add("one exited");
356356
finishLine.countDown();
357-
});
357+
}));
358358

359-
IO<Unit> two = io(() -> {
359+
IO<Unit> two = IO.monitorSync(lock, io(() -> {
360360
oneStarted.await();
361361
accesses.add("two entered");
362362
accesses.add("two exited");
363363
finishLine.countDown();
364-
});
364+
}));
365365

366-
new Thread(IO.monitorSync(lock, one)::unsafePerformIO) {{
366+
new Thread(one::unsafePerformIO) {{
367367
start();
368368
}};
369369

370-
new Thread(IO.monitorSync(lock, two)::unsafePerformIO) {{
370+
new Thread(two::unsafePerformIO) {{
371371
start();
372372
}};
373373

374374
if (!finishLine.await(15, SECONDS))
375-
fail("Expected threads to have completed by now");
375+
fail("Expected threads to have completed by now, only got this far: " + accesses);
376376
assertEquals(asList("one entered", "one exited", "two entered", "two exited"), accesses);
377377
}
378378

0 commit comments

Comments
 (0)