diff --git a/quidem-it/src/main/java/org/apache/druid/quidem/QuidemCaptureResource.java b/quidem-it/src/main/java/org/apache/druid/quidem/QuidemCaptureResource.java index 5d0ad1d5284..e1d174ccd7f 100644 --- a/quidem-it/src/main/java/org/apache/druid/quidem/QuidemCaptureResource.java +++ b/quidem-it/src/main/java/org/apache/druid/quidem/QuidemCaptureResource.java @@ -22,6 +22,7 @@ package org.apache.druid.quidem; import com.google.inject.Inject; import org.apache.druid.guice.LazySingleton; import org.apache.druid.java.util.common.StringUtils; + import javax.inject.Named; import javax.ws.rs.GET; import javax.ws.rs.Path; diff --git a/quidem-it/src/main/java/org/apache/druid/quidem/QuidemRecorder.java b/quidem-it/src/main/java/org/apache/druid/quidem/QuidemRecorder.java index f40a9f55e01..4bc149f7c3c 100644 --- a/quidem-it/src/main/java/org/apache/druid/quidem/QuidemRecorder.java +++ b/quidem-it/src/main/java/org/apache/druid/quidem/QuidemRecorder.java @@ -53,6 +53,10 @@ public class QuidemRecorder implements AutoCloseable, DruidHook @Override public void close() { + if (printStream != null) { + printStream.close(); + printStream = null; + } DruidHook.unregister(DruidHook.SQL, this); }