Skip to content

Instantly share code, notes, and snippets.

@barkbay
Last active December 10, 2015 06:58
public class BaseClassForSecurityTests {
@Before
public void setup() throws Exception {
// Start a Zookeeper unit test server
System.setProperty(DebugUtils.PROPERTY_DONT_LOG_CONNECTION_ISSUES, "true");
// Register our custom authentication provider
System.setProperty("zookeeper.authProvider.1",
"morello.zk.acl.CustomUserAuthenticationProvider");
// Ok, create a testing Zookeeper server with Curator
server = new TestingServer();
}
@After
public void teardown() throws Exception {
System.clearProperty("zookeeeper.authProvider.1");
server.close();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment