From dbfc9b746c94e0112e881ab278415d7f80354536 Mon Sep 17 00:00:00 2001 From: Peter McDonnell Date: Thu, 26 Sep 2013 00:36:03 +0100 Subject: [PATCH] update counter before triggering latch --- rxjava-core/src/test/java/rx/concurrency/TestSchedulers.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rxjava-core/src/test/java/rx/concurrency/TestSchedulers.java b/rxjava-core/src/test/java/rx/concurrency/TestSchedulers.java index 4241ee3f84..7d2851abf9 100644 --- a/rxjava-core/src/test/java/rx/concurrency/TestSchedulers.java +++ b/rxjava-core/src/test/java/rx/concurrency/TestSchedulers.java @@ -361,8 +361,8 @@ public void testSchedulingWithDueTime() throws InterruptedException { @Override public Subscription call(Scheduler scheduler, String state) { System.out.println("doing work"); - latch.countDown(); counter.incrementAndGet(); + latch.countDown(); if (latch.getCount() == 0) { return Subscriptions.empty(); } else {