diff --git a/cache/pom.xml b/cache/pom.xml index 5a25bc1141..62e395e307 100644 --- a/cache/pom.xml +++ b/cache/pom.xml @@ -37,6 +37,8 @@ Cache + 140 + 4.6 @@ -102,12 +104,18 @@ net.runelite.rs cache - 140 + ${cache.version} test + + + src/test/resources + true + + org.apache.maven.plugins diff --git a/cache/src/test/java/net/runelite/cache/StoreLocation.java b/cache/src/test/java/net/runelite/cache/StoreLocation.java index 82514b903a..ad028b512f 100644 --- a/cache/src/test/java/net/runelite/cache/StoreLocation.java +++ b/cache/src/test/java/net/runelite/cache/StoreLocation.java @@ -28,6 +28,7 @@ import java.io.File; import java.io.IOException; import java.io.InputStream; import java.nio.file.Files; +import java.util.Properties; import org.junit.rules.TemporaryFolder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -61,9 +62,17 @@ public class StoreLocation } } + private static Properties getProperies() throws IOException + { + Properties properties = new Properties(); + InputStream resourceAsStream = StoreLocation.class.getResourceAsStream("/cache.properties"); + properties.load(resourceAsStream); + return properties; + } + private static File setupCacheDir() throws IOException { - File file = new File(System.getProperty("java.io.tmpdir"), "cache-work"); + File file = new File(System.getProperty("java.io.tmpdir"), "cache-" + getProperies().getProperty("cache.version")); if (file.exists()) { diff --git a/cache/src/test/resources/cache.properties b/cache/src/test/resources/cache.properties new file mode 100644 index 0000000000..6b22f10e57 --- /dev/null +++ b/cache/src/test/resources/cache.properties @@ -0,0 +1,2 @@ +cache.version=${cache.version} +