From a6bed14005ae933506efe0e76d687c92122acc92 Mon Sep 17 00:00:00 2001 From: Joe Butler <508579+jbutler@users.noreply.github.com> Date: Sat, 28 Jan 2023 04:07:53 -0700 Subject: [PATCH] fix: close mvstore in unit tests (#97) (#676) Failure to close the mvStore between test runs results in failures on Windows due to locked files. --- .../test/java/io/moquette/persistence/H2PersistentQueueTest.java | 1 + 1 file changed, 1 insertion(+) diff --git a/broker/src/test/java/io/moquette/persistence/H2PersistentQueueTest.java b/broker/src/test/java/io/moquette/persistence/H2PersistentQueueTest.java index 6a707ec0d..53518116b 100644 --- a/broker/src/test/java/io/moquette/persistence/H2PersistentQueueTest.java +++ b/broker/src/test/java/io/moquette/persistence/H2PersistentQueueTest.java @@ -46,6 +46,7 @@ public void setUp() { @AfterEach public void tearDown() { + this.mvStore.close(); File dbFile = new File(BrokerConstants.DEFAULT_PERSISTENT_PATH); if (dbFile.exists()) { dbFile.delete();