aboutsummaryrefslogtreecommitdiffstats
path: root/container-search
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-01-28 17:47:21 +0100
committerHenning Baldersheim <balder@yahoo-inc.com>2022-01-28 17:47:21 +0100
commit3920d9c173bdc378c6d70622af7dabad169ae837 (patch)
tree9d1de09e4be58ac11f60bb4e4d1505133d123783 /container-search
parent71daa3cc1401c8f1564755e34b08ed07ecfef620 (diff)
Shutdown executor in test
Diffstat (limited to 'container-search')
-rw-r--r--container-search/src/test/java/com/yahoo/search/query/profile/compiled/CompiledQueryProfileRegistryTest.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/container-search/src/test/java/com/yahoo/search/query/profile/compiled/CompiledQueryProfileRegistryTest.java b/container-search/src/test/java/com/yahoo/search/query/profile/compiled/CompiledQueryProfileRegistryTest.java
index 6819578c2ae..511921ac047 100644
--- a/container-search/src/test/java/com/yahoo/search/query/profile/compiled/CompiledQueryProfileRegistryTest.java
+++ b/container-search/src/test/java/com/yahoo/search/query/profile/compiled/CompiledQueryProfileRegistryTest.java
@@ -7,6 +7,7 @@ import org.junit.Test;
import java.util.concurrent.Executors;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
/**
* @author gjoranv
@@ -23,7 +24,9 @@ public class CompiledQueryProfileRegistryTest {
.value("5")))
.build();
- var registry = new CompiledQueryProfileRegistry(config, Executors.newCachedThreadPool());
+ var executor = Executors.newCachedThreadPool();
+ var registry = new CompiledQueryProfileRegistry(config, executor);
+ assertTrue(executor.shutdownNow().isEmpty());
var profile1 = registry.findQueryProfile("profile1");
assertEquals("5", profile1.get("hits"));
}