Skip to content

Commit

Permalink
Fix unstable test
Browse files Browse the repository at this point in the history
  • Loading branch information
raycoarana committed Mar 30, 2015
1 parent 3fec22b commit 04be96f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@ public class BaindoWorkDispatcher implements WorkDispatcher {

private final AndroidProvider mAndroidProvider;
private final Handler mHandler;
private final CountDownLatch mBackgroundThreadReady = new CountDownLatch(1);
private Handler mBackgroundHandler;

final CountDownLatch mBackgroundThreadReady = new CountDownLatch(1);

public BaindoWorkDispatcher(AndroidProvider androidProvider) {
mAndroidProvider = androidProvider;
mHandler = androidProvider.buildHandlerWithMainLooper();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ private void whenDoInBackgroundThread() {

private void thenBackgroundThreadIsInitialized() {
try {
mBaindoWorkDispatcher.mBackgroundThreadReady.await();
mBaindoWorkDispatcher.mBackgroundThread.join();
} catch (InterruptedException e) {
throw new IllegalStateException("BinderDispatcher doesn't finish it's initialization");
}
Expand Down

0 comments on commit 04be96f

Please sign in to comment.