mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-23 04:41:16 +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() {
|
||||
@Override
|
||||
public void onApiChange(SyncthingService.State currentState) {
|
||||
latch.countDown();
|
||||
if (currentState == SyncthingService.State.ACTIVE)
|
||||
latch.countDown();
|
||||
}
|
||||
});
|
||||
latch.await(1, TimeUnit.SECONDS);
|
||||
latch.await(10, TimeUnit.SECONDS);
|
||||
assertNotNull(getService().getApi());
|
||||
assertNotNull(getService().getWebGuiUrl());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue