use of java.net.HttpURLConnection.HTTP_GONE 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