mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-27 06:41:15 +00:00
Check current state (and wait a bit longer) in the SyncthingService unit test
This commit is contained in:
parent
3784134bea
commit
fadd22148a
1 changed files with 3 additions and 2 deletions
|
@ -66,10 +66,11 @@ public class SyncthingServiceTest extends ServiceTestCase<SyncthingService> {
|
||||||
getService().registerOnApiChangeListener(new SyncthingService.OnApiChangeListener() {
|
getService().registerOnApiChangeListener(new SyncthingService.OnApiChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onApiChange(SyncthingService.State currentState) {
|
public void onApiChange(SyncthingService.State currentState) {
|
||||||
|
if (currentState == SyncthingService.State.ACTIVE)
|
||||||
latch.countDown();
|
latch.countDown();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
latch.await(1, TimeUnit.SECONDS);
|
latch.await(10, TimeUnit.SECONDS);
|
||||||
assertNotNull(getService().getApi());
|
assertNotNull(getService().getApi());
|
||||||
assertNotNull(getService().getWebGuiUrl());
|
assertNotNull(getService().getWebGuiUrl());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue