| | |
| | | import org.testng.annotations.ExpectedExceptions; |
| | | import org.testng.annotations.Test; |
| | | |
| | | import org.opends.server.TestCaseUtils; |
| | | import com.sleepycat.je.Environment; |
| | | import com.sleepycat.je.EnvironmentConfig; |
| | | |
| | |
| | | * EnvManager Tester. |
| | | */ |
| | | public class TestEnvManager extends JebTestCase { |
| | | private File tempDir; |
| | | private String homeDirName; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Configuration(beforeTestClass = true) |
| | | public void setUp() throws Exception { |
| | | File tempFile = File.createTempFile("jebtest", ""); |
| | | tempFile.delete(); |
| | | homeDirName = tempFile.getAbsolutePath(); |
| | | tempDir = TestCaseUtils.createTemporaryDirectory("jebtest"); |
| | | homeDirName = tempDir.getAbsolutePath(); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Configuration(afterTestClass = true) |
| | | public void tearDown() throws Exception { |
| | | File homeDir = new File(homeDirName); |
| | | homeDir.delete(); |
| | | TestCaseUtils.deleteDirectory(tempDir); |
| | | } |
| | | |
| | | /** |