Merge pull request #330 from mposolda/master
Fix LDAP test on windows. Ensure that directory with data for embedded A...
This commit is contained in:
commit
daf1f2ed45
1 changed files with 8 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
||||||
package org.keycloak.model.test;
|
package org.keycloak.model.test;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Hashtable;
|
import java.util.Hashtable;
|
||||||
|
@ -90,6 +91,13 @@ public class LDAPEmbeddedServer extends AbstractLDAPTest {
|
||||||
public void setup() throws Exception {
|
public void setup() throws Exception {
|
||||||
// suppress emb. LDAP server start
|
// suppress emb. LDAP server start
|
||||||
if (isStartEmbeddedLdapLerver()) {
|
if (isStartEmbeddedLdapLerver()) {
|
||||||
|
// On Windows, the directory may not be fully deleted from previous test
|
||||||
|
String tempDir = System.getProperty("java.io.tmpdir");
|
||||||
|
File workDir = new File(tempDir + "/server-work");
|
||||||
|
if (workDir.exists()) {
|
||||||
|
recursiveDeleteDir(workDir);
|
||||||
|
}
|
||||||
|
|
||||||
super.setup();
|
super.setup();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue