use of io.fabric8.kubernetes.api.model.StatusBuilder in project flink by apache.
the class KubernetesPodsWatcherTest method testClosingWithTooOldResourceVersion.
@Test
public void testClosingWithTooOldResourceVersion() {
final String errMsg = "too old resource version";
final KubernetesPodsWatcher podsWatcher = new KubernetesPodsWatcher(new TestingCallbackHandler(e -> {
assertThat(e, Matchers.instanceOf(KubernetesTooOldResourceVersionException.class));
assertThat(e, FlinkMatchers.containsMessage(errMsg));
}));
podsWatcher.onClose(new WatcherException(errMsg, new KubernetesClientException(errMsg, HTTP_GONE, new StatusBuilder().build())));
}
Aggregations