Skip to content

Commit 2f72c4b

Browse files
fix: update testcases for DefaultUserProfileServiceTest
1 parent f149b81 commit 2f72c4b

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

user-profile/src/androidTest/java/com/optimizely/ab/android/user_profile/DefaultUserProfileServiceTest.java

+13-13
Original file line numberDiff line numberDiff line change
@@ -104,19 +104,19 @@ public void teardown() {
104104
cache.delete(diskCache.getFileName());
105105
}
106106

107-
// @Test
108-
// public void startInBackground() throws InterruptedException {
109-
// DefaultUserProfileService ups = spy(DefaultUserProfileService.class);
110-
//
111-
// CountDownLatch latch = new CountDownLatch(1);
112-
// ups.startInBackground((u) -> {
113-
// latch.countDown();
114-
// });
115-
//
116-
// latch.await(3, TimeUnit.SECONDS);
117-
//
118-
// verify(ups).start();
119-
// }
107+
@Test
108+
public void startInBackground() throws InterruptedException {
109+
DefaultUserProfileService ups = spy(userProfileService);
110+
111+
CountDownLatch latch = new CountDownLatch(1);
112+
ups.startInBackground((u) -> {
113+
latch.countDown();
114+
});
115+
116+
latch.await(3, TimeUnit.SECONDS);
117+
118+
verify(ups).start();
119+
}
120120

121121
@Test
122122
public void saveAndStartAndLookup() {

0 commit comments

Comments
 (0)