protected static void startLocator(final String name, int port, final Properties extraProps,
final Properties javaProps, final String[] expectedExceptions) {
try {
Properties authProps = new Properties();
if (extraProps != null) {
authProps.putAll(extraProps);
}
authProps.setProperty(MCAST_PORT, "0");
authProps.setProperty(LOCATORS, getIPLiteral() + "[" + port + "]");
authProps.setProperty(ENABLE_CLUSTER_CONFIGURATION, "false");
clearStaticSSLContext();
setJavaProps(javaProps);
File logFile = new File(name + "-locator" + port + ".log");
FileOutputStream logOut = new FileOutputStream(logFile);
PrintStream logStream = new PrintStream(logOut);
addIgnoredExceptions(expectedExceptions);
logStream.flush();
locator = Locator.startLocatorAndDS(port, logFile, null, authProps);
} catch (IOException ex) {
fail("While starting locator on port " + port, ex);
}
}