diff --git a/dhfs-parent/dhfs-app/src/test/java/com/usatiuk/dhfs/integration/DhfsFuseIT.java b/dhfs-parent/dhfs-app/src/test/java/com/usatiuk/dhfs/integration/DhfsFuseIT.java index 32dd87c3..d7e4b894 100644 --- a/dhfs-parent/dhfs-app/src/test/java/com/usatiuk/dhfs/integration/DhfsFuseIT.java +++ b/dhfs-parent/dhfs-app/src/test/java/com/usatiuk/dhfs/integration/DhfsFuseIT.java @@ -32,9 +32,11 @@ public class DhfsFuseIT { String c1uuid; String c2uuid; + Network network; + @BeforeEach void setup(TestInfo testInfo) throws IOException, InterruptedException, TimeoutException { - Network network = Network.newNetwork(); + network = Network.newNetwork(); container1 = new GenericContainer<>(DhfsImage.getInstance()) .withPrivilegedMode(true) .withCreateContainerCmdModifier(cmd -> Objects.requireNonNull(cmd.getHostConfig()).withDevices(Device.parse("/dev/fuse"))) @@ -81,6 +83,7 @@ public class DhfsFuseIT { @AfterEach void stop() { Stream.of(container1, container2).parallel().forEach(GenericContainer::stop); + network.close(); } @Test diff --git a/dhfs-parent/dhfs-app/src/test/java/com/usatiuk/dhfs/integration/DhfsFusex3IT.java b/dhfs-parent/dhfs-app/src/test/java/com/usatiuk/dhfs/integration/DhfsFusex3IT.java index befe549e..41d6d177 100644 --- a/dhfs-parent/dhfs-app/src/test/java/com/usatiuk/dhfs/integration/DhfsFusex3IT.java +++ b/dhfs-parent/dhfs-app/src/test/java/com/usatiuk/dhfs/integration/DhfsFusex3IT.java @@ -133,6 +133,7 @@ public class DhfsFusex3IT { @AfterEach void stop() { Stream.of(container1, container2, container3).parallel().forEach(GenericContainer::stop); + network.close(); } @Test diff --git a/dhfs-parent/dhfs-app/src/test/java/com/usatiuk/dhfs/integration/KillIT.java b/dhfs-parent/dhfs-app/src/test/java/com/usatiuk/dhfs/integration/KillIT.java index 787ac2f0..ee8d1aa1 100644 --- a/dhfs-parent/dhfs-app/src/test/java/com/usatiuk/dhfs/integration/KillIT.java +++ b/dhfs-parent/dhfs-app/src/test/java/com/usatiuk/dhfs/integration/KillIT.java @@ -100,6 +100,7 @@ public class KillIT { TestDataCleaner.purgeDirectory(data1); TestDataCleaner.purgeDirectory(data2); executor.close(); + network.close(); } private void checkConsistency() { diff --git a/dhfs-parent/dhfs-app/src/test/java/com/usatiuk/dhfs/integration/LazyFsIT.java b/dhfs-parent/dhfs-app/src/test/java/com/usatiuk/dhfs/integration/LazyFsIT.java index db42f10c..4a0e736b 100644 --- a/dhfs-parent/dhfs-app/src/test/java/com/usatiuk/dhfs/integration/LazyFsIT.java +++ b/dhfs-parent/dhfs-app/src/test/java/com/usatiuk/dhfs/integration/LazyFsIT.java @@ -47,6 +47,7 @@ public class LazyFsIT { LazyFs lazyFs2; ExecutorService executor; + Network network; @BeforeEach void setup(TestInfo testInfo) throws IOException, InterruptedException, TimeoutException { @@ -56,7 +57,7 @@ public class LazyFsIT { data1Lazy = Files.createTempDirectory("lazyfsroot").toFile(); data2Lazy = Files.createTempDirectory("lazyfsroot").toFile(); - Network network = Network.newNetwork(); + network = Network.newNetwork(); lazyFs1 = new LazyFs(testInfo.getDisplayName(), data1.toString(), data1Lazy.toString()); lazyFs1.start(); @@ -120,6 +121,7 @@ public class LazyFsIT { TestDataCleaner.purgeDirectory(data2Lazy); executor.close(); + network.close(); } private void checkConsistency() { diff --git a/dhfs-parent/dhfs-app/src/test/java/com/usatiuk/dhfs/integration/ResyncIT.java b/dhfs-parent/dhfs-app/src/test/java/com/usatiuk/dhfs/integration/ResyncIT.java index 5e4e0426..6f80d7b8 100644 --- a/dhfs-parent/dhfs-app/src/test/java/com/usatiuk/dhfs/integration/ResyncIT.java +++ b/dhfs-parent/dhfs-app/src/test/java/com/usatiuk/dhfs/integration/ResyncIT.java @@ -29,9 +29,11 @@ public class ResyncIT { String c1uuid; String c2uuid; + Network network; + @BeforeEach void setup(TestInfo testInfo) throws IOException, InterruptedException, TimeoutException { - Network network = Network.newNetwork(); + network = Network.newNetwork(); container1 = new GenericContainer<>(DhfsImage.getInstance()) .withPrivilegedMode(true) @@ -55,6 +57,7 @@ public class ResyncIT { @AfterEach void stop() { Stream.of(container1, container2).parallel().forEach(GenericContainer::stop); + network.close(); } @Test