diff --git a/components/fabric8-apm/src/main/java/io/fabric8/apmagent/strategy/trace/TraceStrategy.java b/components/fabric8-apm/src/main/java/io/fabric8/apmagent/strategy/trace/TraceStrategy.java index 8c85ee94a14..ee6c4e9e379 100644 --- a/components/fabric8-apm/src/main/java/io/fabric8/apmagent/strategy/trace/TraceStrategy.java +++ b/components/fabric8-apm/src/main/java/io/fabric8/apmagent/strategy/trace/TraceStrategy.java @@ -257,6 +257,7 @@ public void run() { } } } catch (InterruptedException e) { + Thread.currentThread().interrupt(); shutDown(); } } diff --git a/components/fabric8-arquillian/src/main/java/io/fabric8/arquillian/utils/Util.java b/components/fabric8-arquillian/src/main/java/io/fabric8/arquillian/utils/Util.java index b2e3a5e81f4..24112fc17a2 100644 --- a/components/fabric8-arquillian/src/main/java/io/fabric8/arquillian/utils/Util.java +++ b/components/fabric8-arquillian/src/main/java/io/fabric8/arquillian/utils/Util.java @@ -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); } } @@ -281,6 +282,7 @@ public static void cleanupAllResources(KubernetesClient client, Session session, try { Thread.sleep(1000); } catch (InterruptedException e) { + Thread.currentThread().interrupt(); e.printStackTrace(); } } diff --git a/components/fabric8-utils/src/main/java/io/fabric8/utils/Asserts.java b/components/fabric8-utils/src/main/java/io/fabric8/utils/Asserts.java index 21aa6a835a2..d2aaef8fa7c 100644 --- a/components/fabric8-utils/src/main/java/io/fabric8/utils/Asserts.java +++ b/components/fabric8-utils/src/main/java/io/fabric8/utils/Asserts.java @@ -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(); } } diff --git a/components/fabric8-utils/src/main/java/io/fabric8/utils/Processes.java b/components/fabric8-utils/src/main/java/io/fabric8/utils/Processes.java index ad1648dd179..e367756f8ff 100644 --- a/components/fabric8-utils/src/main/java/io/fabric8/utils/Processes.java +++ b/components/fabric8-utils/src/main/java/io/fabric8/utils/Processes.java @@ -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); } @@ -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); } diff --git a/components/kubernetes-assertions/src/main/java/io/fabric8/kubernetes/assertions/MultiHasPodSelectionAssert.java b/components/kubernetes-assertions/src/main/java/io/fabric8/kubernetes/assertions/MultiHasPodSelectionAssert.java index b84e4ed5910..529952dda1f 100644 --- a/components/kubernetes-assertions/src/main/java/io/fabric8/kubernetes/assertions/MultiHasPodSelectionAssert.java +++ b/components/kubernetes-assertions/src/main/java/io/fabric8/kubernetes/assertions/MultiHasPodSelectionAssert.java @@ -67,6 +67,7 @@ public void run() { try { thread.join(); } catch (InterruptedException e) { + Thread.currentThread().interrupt(); fail("Interrupted: "+e); } } diff --git a/components/kubernetes-assertions/src/main/java/io/fabric8/kubernetes/assertions/support/PodWatcher.java b/components/kubernetes-assertions/src/main/java/io/fabric8/kubernetes/assertions/support/PodWatcher.java index 13fe3f4e627..019661c9f69 100644 --- a/components/kubernetes-assertions/src/main/java/io/fabric8/kubernetes/assertions/support/PodWatcher.java +++ b/components/kubernetes-assertions/src/main/java/io/fabric8/kubernetes/assertions/support/PodWatcher.java @@ -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; } @@ -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; }