Skip to content
This repository has been archived by the owner on Oct 5, 2022. It is now read-only.

Mark current thread as interrupted #7022

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ public void run() {
}
}
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
shutDown();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ protected static void waitUntilWeCanDestroyNamespace(Session session) {
try {
Thread.sleep(timeout * 1000);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
log.info("Interupted sleeping to GC the namespace: " + e);
}
}
Expand Down Expand Up @@ -281,6 +282,7 @@ public static void cleanupAllResources(KubernetesClient client, Session session,
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
e.printStackTrace();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ public static void assertForPeriod(long timeoutMs, Block block) throws Exception
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
e.printStackTrace();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ protected static int killProcessWindows(Long pid, String params) {
try {
return process != null ? process.waitFor() : 1;
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
String message = format("Interrupted while waiting for 'taskkill /PID %d ' command to finish", pid);
throw new RuntimeException(message, e);
}
Expand All @@ -266,6 +267,7 @@ protected static int killProcessUnix(Long pid, String params) {
try {
return process != null ? process.waitFor() : 1;
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
String message = format("Interrupted while waiting for 'kill %d ' command to finish", pid);
throw new RuntimeException(message, e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ public void run() {
try {
thread.join();
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
fail("Interrupted: "+e);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ public void waitForPodReady() {
try {
ready = podReady.await(readyTimeoutMS, TimeUnit.MILLISECONDS);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
LOG.warn("Interupted waiting for podReady: " + e);
ready = podReady.getCount() == 0L;
}
Expand All @@ -201,6 +202,7 @@ public void waitForPodReady() {
try {
ready = podReadyForEntireDuration.await(readyPeriodMS * 2, TimeUnit.MILLISECONDS);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
LOG.warn("Interupted waiting for podReadyForEntireDuration: " + e);
ready = podReadyForEntireDuration.getCount() == 0L;
}
Expand Down