From 724212381cf8fa7c13500fbe385f4a9c66021d7e Mon Sep 17 00:00:00 2001 From: Zoltan Haindrich Date: Thu, 20 Jun 2024 16:40:06 +0000 Subject: [PATCH] close stuff --- .../java/org/apache/druid/quidem/QuidemCaptureResource.java | 1 + .../src/main/java/org/apache/druid/quidem/QuidemRecorder.java | 4 ++++ 2 files changed, 5 insertions(+) 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); }