This is an automated email from the ASF dual-hosted git repository.
dhemery pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git
The following commit(s) were added to refs/heads/develop by this push:
new 6d58009 GEODE-8495: Make tests honor default disk dir property (#5586)
6d58009 is described below
commit 6d58009eb7b391dfbdbe8c673af596ab4da41096
Author: Dale Emery <[email protected]>
AuthorDate: Fri Oct 2 09:04:02 2020 -0700
GEODE-8495: Make tests honor default disk dir property (#5586)
The testClientSubscriptionQueueUsingDefaultDS() test in
CacheXml66DUnitTest and its subclasses assumed that the system’s default
disk directory is the JVM’s current working directory.
This change removes that assumption by making the tests honor the
defaultDiskDirs system property.
Authored-by: Dale Emery <[email protected]>
---
.../java/org/apache/geode/cache30/CacheXml66DUnitTest.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git
a/geode-core/src/distributedTest/java/org/apache/geode/cache30/CacheXml66DUnitTest.java
b/geode-core/src/distributedTest/java/org/apache/geode/cache30/CacheXml66DUnitTest.java
index 7158532c..b8d918a 100644
---
a/geode-core/src/distributedTest/java/org/apache/geode/cache30/CacheXml66DUnitTest.java
+++
b/geode-core/src/distributedTest/java/org/apache/geode/cache30/CacheXml66DUnitTest.java
@@ -122,6 +122,7 @@ import org.apache.geode.internal.cache.PartitionedRegion;
import org.apache.geode.internal.cache.PoolFactoryImpl;
import org.apache.geode.internal.cache.functions.TestFunction;
import
org.apache.geode.internal.cache.partitioned.fixed.QuarterPartitionResolver;
+import org.apache.geode.internal.cache.persistence.DefaultDiskDirs;
import org.apache.geode.internal.cache.xmlcache.CacheCreation;
import
org.apache.geode.internal.cache.xmlcache.CacheTransactionManagerCreation;
import org.apache.geode.internal.cache.xmlcache.CacheXml;
@@ -531,9 +532,9 @@ public abstract class CacheXml66DUnitTest extends
CacheXmlTestCase {
ClientSubscriptionConfig chaqf = server.getClientSubscriptionConfig();
assertEquals("entry", chaqf.getEvictionPolicy());
assertEquals(501, chaqf.getCapacity());
- File curDir = new File(".").getAbsoluteFile();
+ File defaultDiskDir =
DefaultDiskDirs.getDefaultDiskDirs()[0].getAbsoluteFile();
File lockFile =
- new File(curDir, "DRLK_IF" +
GemFireCacheImpl.getDefaultDiskStoreName() + ".lk");
+ new File(defaultDiskDir, "DRLK_IF" +
GemFireCacheImpl.getDefaultDiskStoreName() + ".lk");
assertTrue(lockFile.exists());
}