- @Override
- protected void setUp() throws Exception {
- Path tempDir = Files.createTempDirectory(getClass().getName());
- String uriProp = System.getProperty("argeo.userdirectory.uri");
- if (uriProp != null)
- uri = new URI(uriProp);
- else {
- tempDir.toFile().deleteOnExit();
- Path ldifPath = tempDir.resolve(BASE_DN + ".ldif");
- try (InputStream in = getClass().getResource("basic.ldif").openStream()) {
- Files.copy(in, ldifPath);
- }
- uri = ldifPath.toUri();
- }
-
- bitronix.tm.Configuration tmConf = TransactionManagerServices.getConfiguration();
- tmConf.setServerId(UUID.randomUUID().toString());
- tmConf.setLogPart1Filename(new File(tempDir.toFile(), "btm1.tlog").getAbsolutePath());
- tmConf.setLogPart2Filename(new File(tempDir.toFile(), "btm2.tlog").getAbsolutePath());
- tm = TransactionManagerServices.getTransactionManager();
-
- userAdmin = initUserAdmin(uri, tm);
- }
-