From f0b07499cc12092427d65736f701fc61a1a37dc4 Mon Sep 17 00:00:00 2001 From: Patrik Ivarsson Date: Mon, 5 Sep 2022 10:35:13 +0200 Subject: [PATCH] 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 ceca73b..239a06e 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 @@ -15,11 +15,18 @@ */ package com.avanza.gs.test; +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: *