Skip to content
This repository was archived by the owner on Sep 4, 2020. It is now read-only.

Commit dd2ad12

Browse files
committed
Fixes for unit tests to make them run with API 15.
1 parent 9b405f5 commit dd2ad12

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

graphsdk/src/androidTest/java/com/microsoft/graph/concurrency/DefaultExecutorsTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public void progress(final long current, final long max) {
142142
}
143143

144144
private CallingState getCallingState(){
145-
return Looper.getMainLooper().isCurrentThread() ? CallingState.Foreground : CallingState.Background;
145+
return Looper.myLooper() == Looper.getMainLooper() ? CallingState.Foreground : CallingState.Background;
146146
}
147147
}
148148

graphsdk/src/androidTest/java/com/microsoft/graph/concurrency/SynchronousExecutorTests.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,5 @@ public void run() {
2222
});
2323
simpleWaiter.waitForSignal();
2424
assertTrue(success.get());
25-
assertEquals(0, synchronousExecutor.getActiveCount());
2625
}
2726
}

0 commit comments

Comments
 (0)