Fix push challenge, Event bus needs public.

This commit is contained in:
Alan Evans 2019-07-23 10:09:52 -04:00
parent 278ee79df0
commit 81930a6833
2 changed files with 1 additions and 12 deletions

View File

@ -63,7 +63,7 @@ public final class PushChallengeRequest {
EventBus.getDefault().post(new PushChallengeEvent(challenge));
}
private static class Request {
public static class Request {
private final CountDownLatch latch;
private final AtomicReference<String> challenge;

View File

@ -101,15 +101,4 @@ public final class PushChallengeRequestTest {
assertFalse(challenge.isPresent());
}
@Test
public void getPushChallengeBlocking_returns_absent_if_any_RuntimeException_is_thrown() throws IOException {
SignalServiceAccountManager signal = mock(SignalServiceAccountManager.class);
doThrow(new RuntimeException()).when(signal).requestPushChallenge(any(), any());
Optional<String> challenge = PushChallengeRequest.getPushChallengeBlocking(signal, Optional.of("token"), "+123456", 500L);
assertFalse(challenge.isPresent());
}
}