Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion zeppelin-plugins/launcher/k8s-standard/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

<properties>
<plugin.name>Launcher/K8sStandardInterpreterLauncher</plugin.name>
<kubernetes.client.version>5.3.2</kubernetes.client.version>
<kubernetes.client.version>5.4.1</kubernetes.client.version>
<jinjava.version>2.5.4</jinjava.version>
</properties>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import java.util.concurrent.TimeUnit;

import org.apache.commons.lang3.StringUtils;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import io.fabric8.kubernetes.api.model.Pod;
Expand All @@ -44,7 +43,6 @@ class PodPhaseWatcherTest {
KubernetesClient client;

@Test
@Disabled("Reamer - ZEPPELIN-5403")
void testPhase() throws InterruptedException {
// CREATE
client.pods().inNamespace("ns1")
Expand All @@ -57,24 +55,25 @@ void testPhase() throws InterruptedException {
// WATCH
PodPhaseWatcher podWatcher = new PodPhaseWatcher(
phase -> StringUtils.equalsAnyIgnoreCase(phase, "Succeeded", "Failed", "Running"));
Watch watch = client.pods().inNamespace("ns1").withName("pod1").watch(podWatcher);
try (Watch watch = client.pods().inNamespace("ns1").withName("pod1").watch(podWatcher)) {

// Update Pod to "pending" phase
pod.setStatus(new PodStatus(null, null, null, null, null, null, null, "Pending", null, null,
null, null, null));
client.pods().inNamespace("ns1").updateStatus(pod);
// Update Pod to "pending" phase
pod.setStatus(new PodStatus(null, null, null, null, null, null, null, "Pending", null, null,
null, null, null));
pod = client.pods().inNamespace("ns1").updateStatus(pod);

// Update Pod to "Running" phase
pod.setStatus(new PodStatusBuilder(new PodStatus(null, null, null, null, null, null, null,
"Running", null, null, null, null, null)).build());
client.pods().inNamespace("ns1").updateStatus(pod);
// Wait a little bit, till update is applied
Thread.sleep(1000);
// Update Pod to "Running" phase
pod.setStatus(new PodStatusBuilder(new PodStatus(null, null, null, null, null, null, null,
"Running", null, null, null, null, null)).build());
client.pods().inNamespace("ns1").updateStatus(pod);

assertTrue(podWatcher.getCountDownLatch().await(1, TimeUnit.SECONDS));
watch.close();
assertTrue(podWatcher.getCountDownLatch().await(1, TimeUnit.SECONDS));
}
}

@Test
@Disabled("Reamer - ZEPPELIN-5403")
void testPhaseWithError() throws InterruptedException {
// CREATE
client.pods().inNamespace("ns1")
Expand Down