Randomize file system entry cache DB directory to avoid race conditions with concurrent unit test runs.
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS |
| | | */ |
| | | package org.opends.server.extensions; |
| | | |
| | |
| | | EntryCacheCfgDefn.getInstance(), cacheFIFOConfigEntry)); |
| | | cacheOrderMap.put(2, fifoCache); |
| | | |
| | | File cacheDirectory = TestCaseUtils.createTemporaryDirectory("opendj-test"); |
| | | fsCache = new FileSystemEntryCache(); |
| | | cacheFSConfigEntry = TestCaseUtils.makeEntry( |
| | | "dn: cn=File System,cn=Entry Caches,cn=config", |
| | |
| | | "ds-cfg-enabled: true", |
| | | "ds-cfg-include-filter: uid=fs*", |
| | | "ds-cfg-include-filter: uid=test3*", |
| | | "ds-cfg-include-filter: uid=test0*"); |
| | | "ds-cfg-include-filter: uid=test0*", |
| | | "ds-cfg-cache-directory: " + cacheDirectory.getAbsolutePath()); |
| | | |
| | | fsCache.initializeEntryCache(AdminTestCaseUtils.getConfiguration( |
| | | EntryCacheCfgDefn.getInstance(), cacheFSConfigEntry)); |
| | | cacheOrderMap.put(3, fsCache); |
| | |
| | | * |
| | | * |
| | | * Copyright 2007-2008 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS |
| | | */ |
| | | package org.opends.server.extensions; |
| | | |
| | |
| | | TestCaseUtils.startServer(); |
| | | |
| | | // Configure this entry cache. |
| | | File cacheDirectory = TestCaseUtils.createTemporaryDirectory("opendj-test"); |
| | | cacheConfigEntry = TestCaseUtils.makeEntry( |
| | | "dn: cn=File System,cn=Entry Caches,cn=config", |
| | | "objectClass: ds-cfg-file-system-entry-cache", |
| | |
| | | "ds-cfg-java-class: " + |
| | | "org.opends.server.extensions.FileSystemEntryCache", |
| | | "ds-cfg-enabled: true", |
| | | "ds-cfg-max-entries: " + Integer.toString(super.MAXENTRIES)); |
| | | "ds-cfg-max-entries: " + Integer.toString(super.MAXENTRIES), |
| | | "ds-cfg-cache-directory: " + cacheDirectory.getAbsolutePath()); |
| | | super.configuration = AdminTestCaseUtils.getConfiguration( |
| | | EntryCacheCfgDefn.getInstance(), cacheConfigEntry); |
| | | |