From db5a2171cabe7486ed2bda5962365f85c16ce870 Mon Sep 17 00:00:00 2001 From: Patrik Ivarsson Date: Mon, 5 Sep 2022 10:35:13 +0200 Subject: [PATCH 1/2] TP-1222: Set GS_HOME to avoid files being created locally * Setting `GS_HOME` avoids temporary files being created in project directory when running tests * Instead, set up a temporary folder to store these temporary files, deleting these after test execution completes --- .../gs/test/InMemoryGigaSpacesManager.java | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/gs-test-core/src/main/java/com/avanza/gs/test/InMemoryGigaSpacesManager.java b/gs-test-core/src/main/java/com/avanza/gs/test/InMemoryGigaSpacesManager.java index 21f0189..bcaac6d 100644 --- a/gs-test-core/src/main/java/com/avanza/gs/test/InMemoryGigaSpacesManager.java +++ b/gs-test-core/src/main/java/com/avanza/gs/test/InMemoryGigaSpacesManager.java @@ -17,11 +17,18 @@ import static com.gigaspaces.start.SystemInfo.LOOKUP_LOCATORS_SYS_PROP; +import java.io.IOException; +import java.io.UncheckedIOException; +import java.nio.file.Files; import java.nio.file.Path; +import java.util.Comparator; +import java.util.stream.Stream; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import com.gigaspaces.CommonSystemProperties; + /** * This is intended to simulate an in-memory version of GigaSpaces Manager, and starts the following components: *