use of com.hubspot.mesos.rx.java.MesosClientErrorContext in project Singularity by HubSpot.
the class SingularityMesosSchedulerClientTest method itCheckAndReconnectThrowsException.
@Test
public void itCheckAndReconnectThrowsException() {
Mesos4xxException exception = new Mesos4xxException(new Object(), new MesosClientErrorContext(403, "Framework not subscribed", new ArrayList<>()));
doAnswer((InvocationOnMock invocation) -> {
((Runnable) invocation.getArguments()[0]).run();
return null;
}).when(executorService).execute(any(Runnable.class));
client.checkAndReconnect(exception).join();
verify(scheduler, times(1)).onUncaughtException(any());
}
Aggregations