clear System properties when the test tears down
This commit is contained in:
parent
684e5a4a6c
commit
fd94f30e26
@ -6,6 +6,7 @@ import javax.naming.Context;
|
||||
import javax.naming.InitialContext;
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@ -34,4 +35,13 @@ public class SimpleJNDIUnitTest {
|
||||
assertEquals(dsString, ds.toString());
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
public void tearDown() {
|
||||
System.clearProperty("java.naming.factory.initial");
|
||||
System.clearProperty("org.osjava.sj.root");
|
||||
System.clearProperty("org.osjava.sj.delimiter");
|
||||
System.clearProperty("jndi.syntax.separator");
|
||||
System.clearProperty("org.osjava.sj.space");
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user