diff --git a/.idea/inspectionProfiles/Druid.xml b/.idea/inspectionProfiles/Druid.xml
index bac71e73508..5791c1c456b 100644
--- a/.idea/inspectionProfiles/Druid.xml
+++ b/.idea/inspectionProfiles/Druid.xml
@@ -311,6 +311,14 @@
+
+
+
+
+
+
+
+
diff --git a/core/src/test/java/org/apache/druid/testing/DeadlockDetectingFailOnTimeout.java b/core/src/test/java/org/apache/druid/testing/DeadlockDetectingFailOnTimeout.java
index ecb27110122..2fbb933bde9 100644
--- a/core/src/test/java/org/apache/druid/testing/DeadlockDetectingFailOnTimeout.java
+++ b/core/src/test/java/org/apache/druid/testing/DeadlockDetectingFailOnTimeout.java
@@ -179,6 +179,7 @@ final class DeadlockDetectingFailOnTimeout extends Statement
* problem or if the thread cannot be determined. The return value is never equal
* to {@code mainThread}.
*/
+ @SuppressWarnings("SSBasedInspection") // Prohibit check on Thread.getState()
private Thread getStuckThread(Thread mainThread)
{
List threadsInGroup = getThreadsInGroup(mainThread.getThreadGroup());
diff --git a/server/src/test/java/org/apache/druid/segment/realtime/firehose/EventReceiverFirehoseIdleTest.java b/server/src/test/java/org/apache/druid/segment/realtime/firehose/EventReceiverFirehoseIdleTest.java
index 97edb6a49ec..878a7d4b83e 100644
--- a/server/src/test/java/org/apache/druid/segment/realtime/firehose/EventReceiverFirehoseIdleTest.java
+++ b/server/src/test/java/org/apache/druid/segment/realtime/firehose/EventReceiverFirehoseIdleTest.java
@@ -100,9 +100,7 @@ public class EventReceiverFirehoseIdleTest
private void awaitDelayedExecutorThreadTerminated() throws InterruptedException
{
- while (firehose.getDelayedCloseExecutor().getState() != Thread.State.TERMINATED) {
- Thread.sleep(50);
- }
+ firehose.getDelayedCloseExecutor().join();
}
@Test(timeout = 40_000L)
diff --git a/server/src/test/java/org/apache/druid/segment/realtime/firehose/EventReceiverFirehoseTest.java b/server/src/test/java/org/apache/druid/segment/realtime/firehose/EventReceiverFirehoseTest.java
index e9c7ee3a0c2..683e870bae0 100644
--- a/server/src/test/java/org/apache/druid/segment/realtime/firehose/EventReceiverFirehoseTest.java
+++ b/server/src/test/java/org/apache/druid/segment/realtime/firehose/EventReceiverFirehoseTest.java
@@ -275,9 +275,7 @@ public class EventReceiverFirehoseTest
private void awaitDelayedExecutorThreadTerminated() throws InterruptedException
{
- while (firehose.getDelayedCloseExecutor().getState() != Thread.State.TERMINATED) {
- Thread.sleep(50);
- }
+ firehose.getDelayedCloseExecutor().join();
}
@Test(timeout = 60_000L)