summaryrefslogtreecommitdiffstats
path: root/src/junit
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2019-04-03 01:00:29 +0200
committerSven Gothel <[email protected]>2019-04-03 01:00:29 +0200
commit1157b913a068167062c853b4b525954b223a5509 (patch)
tree8cab1fcdc3d512a6c94c77692b9d7695f9739c9c /src/junit
parentecb65c39a6902158ed824348a23dbbcb42a85f01 (diff)
Bug 1367: Make TempFileCache & TempJarCache even if temp folder can't handle executables
Diffstat (limited to 'src/junit')
-rw-r--r--src/junit/com/jogamp/common/util/TestJarUtil.java14
-rw-r--r--src/junit/com/jogamp/common/util/TestTempJarCache.java10
2 files changed, 12 insertions, 12 deletions
diff --git a/src/junit/com/jogamp/common/util/TestJarUtil.java b/src/junit/com/jogamp/common/util/TestJarUtil.java
index 747da8f..6cc38ed 100644
--- a/src/junit/com/jogamp/common/util/TestJarUtil.java
+++ b/src/junit/com/jogamp/common/util/TestJarUtil.java
@@ -73,7 +73,7 @@ public class TestJarUtil extends SingletonJunitCase {
Assert.assertTrue(TempCacheReg.isTempFileCacheUsed());
fileCache = new TempFileCache();
- Assert.assertTrue(fileCache.isValid());
+ Assert.assertTrue(fileCache.isValid(false));
System.err.println("tmp dir: "+fileCache.getTempDir());
}
@@ -150,8 +150,8 @@ public class TestJarUtil extends SingletonJunitCase {
System.err.println("XXXXXXXXXXXXXXXXXXXXXXXXXXXX");
Assert.assertTrue(TempJarCache.initSingleton());
- Assert.assertTrue(TempCacheReg.isTempJarCacheUsed());
- Assert.assertTrue(TempJarCache.isInitialized());
+ Assert.assertTrue(TempCacheReg.isTempJarCacheUsed(false));
+ Assert.assertTrue(TempJarCache.isInitialized(false));
final ClassLoader rootCL = this.getClass().getClassLoader();
@@ -171,8 +171,8 @@ public class TestJarUtil extends SingletonJunitCase {
System.err.println("XXXXXXXXXXXXXXXXXXXXXXXXXXXX");
Assert.assertTrue(TempJarCache.initSingleton());
- Assert.assertTrue(TempCacheReg.isTempJarCacheUsed());
- Assert.assertTrue(TempJarCache.isInitialized());
+ Assert.assertTrue(TempCacheReg.isTempJarCacheUsed(false));
+ Assert.assertTrue(TempJarCache.isInitialized(false));
final ClassLoader rootCL = this.getClass().getClassLoader();
@@ -199,8 +199,8 @@ public class TestJarUtil extends SingletonJunitCase {
System.err.println("XXXXXXXXXXXXXXXXXXXXXXXXXXXX");
Assert.assertTrue(TempJarCache.initSingleton());
- Assert.assertTrue(TempCacheReg.isTempJarCacheUsed());
- Assert.assertTrue(TempJarCache.isInitialized());
+ Assert.assertTrue(TempCacheReg.isTempJarCacheUsed(false));
+ Assert.assertTrue(TempJarCache.isInitialized(false));
/** This classloader mimics what OSGi's does -- it takes jar: URLs and makes them into bundleresource: URLs
* where the JAR is not directly accessible anymore. Here I leave the JAR name at the end of the URL so I can
diff --git a/src/junit/com/jogamp/common/util/TestTempJarCache.java b/src/junit/com/jogamp/common/util/TestTempJarCache.java
index 9cc855f..4507eb8 100644
--- a/src/junit/com/jogamp/common/util/TestTempJarCache.java
+++ b/src/junit/com/jogamp/common/util/TestTempJarCache.java
@@ -72,8 +72,8 @@ public class TestTempJarCache extends SingletonJunitCase {
Assert.assertTrue(fileCache3.getTempDir().exists());
Assert.assertTrue(fileCache3.getTempDir().isDirectory());
- Assert.assertEquals(fileCache2.getBaseDir(), fileCache3.getBaseDir());
- Assert.assertEquals(fileCache2.getRootDir(), fileCache3.getRootDir());
+ Assert.assertEquals(TempFileCache.getBaseDir(), TempFileCache.getBaseDir());
+ Assert.assertEquals(TempFileCache.getRootDir(), TempFileCache.getRootDir());
if(shallBeSame) {
Assert.assertTrue("file caches are not equal", fileCache2.getTempDir().equals(fileCache3.getTempDir()));
@@ -122,7 +122,7 @@ public class TestTempJarCache extends SingletonJunitCase {
Assert.assertTrue(TempCacheReg.isTempFileCacheUsed());
fileCache = new TempFileCache();
- Assert.assertTrue(fileCache.isValid());
+ Assert.assertTrue(fileCache.isValid(false));
System.err.println("tmp dir: "+fileCache.getTempDir());
}
@@ -167,8 +167,8 @@ public class TestTempJarCache extends SingletonJunitCase {
// Assert.assertFalse(TempCacheReg.isTempJarCacheUsed());
// Assert.assertFalse(TempJarCache.isInitialized());
Assert.assertTrue(TempJarCache.initSingleton());
- Assert.assertTrue(TempCacheReg.isTempJarCacheUsed());
- Assert.assertTrue(TempJarCache.isInitialized());
+ Assert.assertTrue(TempCacheReg.isTempJarCacheUsed(false));
+ Assert.assertTrue(TempJarCache.isInitialized(false));
}
@Test