Skip to content

Commit 297621f

Browse files
author
Yannick Weber
authored
Added tmpFs usage for HiveMQ module (#5109)
Improves performance for IO heavy operations
1 parent 9712d25 commit 297621f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

modules/hivemq/src/main/java/org/testcontainers/hivemq/HiveMQContainer.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import java.nio.charset.StandardCharsets;
1919
import java.time.Duration;
2020
import java.util.Collections;
21+
import java.util.HashMap;
2122
import java.util.HashSet;
2223
import java.util.Set;
2324
import java.util.concurrent.ConcurrentHashMap;
@@ -77,6 +78,16 @@ public HiveMQContainer(final @NotNull DockerImageName dockerImageName) {
7778
});
7879
}
7980
});
81+
82+
final HashMap<String, String> tmpFs = new HashMap<>();
83+
if (dockerImageName.isCompatibleWith(DEFAULT_HIVEMQ_EE_IMAGE_NAME)) {
84+
tmpFs.put("/opt/hivemq/audit", "rw");
85+
tmpFs.put("/opt/hivemq/backup", "rw");
86+
}
87+
88+
tmpFs.put("/opt/hivemq/log", "rw");
89+
tmpFs.put("/opt/hivemq/data", "rw");
90+
withTmpFs(tmpFs);
8091
}
8192

8293
@Override

0 commit comments

Comments
 (0)