You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ji...@apache.org on 2018/08/08 15:44:47 UTC
[geode] branch develop updated: GEODE-838: remove port conflict by
always creating the cache server connecting to dunit locator (#2275)
This is an automated email from the ASF dual-hosted git repository.
jinmeiliao pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git
The following commit(s) were added to refs/heads/develop by this push:
new d89ac55 GEODE-838: remove port conflict by always creating the cache server connecting to dunit locator (#2275)
d89ac55 is described below
commit d89ac55c79e18e54b8748a62aa95759afdac16ef
Author: jinmeiliao <ji...@pivotal.io>
AuthorDate: Wed Aug 8 08:44:43 2018 -0700
GEODE-838: remove port conflict by always creating the cache server connecting to dunit locator (#2275)
---
.../security/ClientAuthenticationTestCase.java | 97 ++++++----------------
.../security/ClientAuthenticationTestUtils.java | 26 +++---
.../security/ClientMultiUserAuthzDUnitTest.java | 5 +-
.../DeltaClientAuthorizationDUnitTest.java | 8 +-
.../DeltaClientPostAuthorizationDUnitTest.java | 9 +-
.../geode/security/P2PAuthenticationDUnitTest.java | 10 +--
.../security/ClientAuthzObjectModDUnitTest.java | 5 +-
.../ClientCQPostAuthorizationDUnitTest.java | 12 ++-
.../security/ClientPostAuthorizationDUnitTest.java | 9 +-
.../geode/security/MultiUserAPIDUnitTest.java | 15 ++--
.../security/MultiUserDurableCQAuthzDUnitTest.java | 9 +-
.../security/ClientAuthorizationTestCase.java | 34 +++-----
.../apache/geode/security/SecurityTestUtils.java | 55 ++----------
.../wan/misc/NewWanAuthenticationDUnitTest.java | 2 +-
14 files changed, 90 insertions(+), 206 deletions(-)
diff --git a/geode-core/src/distributedTest/java/org/apache/geode/security/ClientAuthenticationTestCase.java b/geode-core/src/distributedTest/java/org/apache/geode/security/ClientAuthenticationTestCase.java
index fe86872..0283d66 100644
--- a/geode-core/src/distributedTest/java/org/apache/geode/security/ClientAuthenticationTestCase.java
+++ b/geode-core/src/distributedTest/java/org/apache/geode/security/ClientAuthenticationTestCase.java
@@ -37,8 +37,6 @@ import static org.apache.geode.security.SecurityTestUtils.doProxyCacheClose;
import static org.apache.geode.security.SecurityTestUtils.doPuts;
import static org.apache.geode.security.SecurityTestUtils.doSimpleGet;
import static org.apache.geode.security.SecurityTestUtils.doSimplePut;
-import static org.apache.geode.security.SecurityTestUtils.getAndClearLocatorString;
-import static org.apache.geode.security.SecurityTestUtils.getLocatorPort;
import static org.apache.geode.security.SecurityTestUtils.registerExpectedExceptions;
import static org.apache.geode.security.SecurityTestUtils.verifyIsEmptyOnServer;
import static org.apache.geode.security.SecurityTestUtils.verifySizeOnServer;
@@ -165,14 +163,10 @@ public abstract class ClientAuthenticationTestCase extends JUnit4DistributedTest
getLogWriter().info("testValidCredentials: Using authinit: " + authInit);
// Start the servers
- int locPort1 = getLocatorPort();
- int locPort2 = getLocatorPort();
- String locString = getAndClearLocatorString();
-
int port1 = server1
- .invoke(() -> createCacheServer(locPort1, locString, authenticator, extraProps, javaProps));
+ .invoke(() -> createCacheServer(authenticator, extraProps, javaProps));
int port2 = server2
- .invoke(() -> createCacheServer(locPort2, locString, authenticator, extraProps, javaProps));
+ .invoke(() -> createCacheServer(authenticator, extraProps, javaProps));
// Start the clients with valid credentials
Properties credentials1 = gen.getValidCredentials(1);
@@ -222,13 +216,9 @@ public abstract class ClientAuthenticationTestCase extends JUnit4DistributedTest
getLogWriter().info("testNoCredentials: Using authinit: " + authInit);
// Start the servers
- int locPort1 = getLocatorPort();
- int locPort2 = getLocatorPort();
- String locString = getAndClearLocatorString();
-
- int port1 = createServer1(extraProps, javaProps, authenticator, locPort1, locString);
+ int port1 = createServer1(extraProps, javaProps, authenticator);
int port2 = server2
- .invoke(() -> createCacheServer(locPort2, locString, authenticator, extraProps, javaProps));
+ .invoke(() -> createCacheServer(authenticator, extraProps, javaProps));
// Start first client with valid credentials
Properties credentials1 = gen.getValidCredentials(1);
@@ -265,13 +255,9 @@ public abstract class ClientAuthenticationTestCase extends JUnit4DistributedTest
String authInit = gen.getAuthInit();
// Start the servers
- int locPort1 = getLocatorPort();
- int locPort2 = getLocatorPort();
- String locString = getAndClearLocatorString();
-
- int port1 = createServer1(extraProps, javaProps, authenticator, locPort1, locString);
+ int port1 = createServer1(extraProps, javaProps, authenticator);
int port2 = server2
- .invoke(() -> createCacheServer(locPort2, locString, authenticator, extraProps, javaProps));
+ .invoke(() -> createCacheServer(authenticator, extraProps, javaProps));
// Start first client with valid credentials
Properties credentials1 = gen.getValidCredentials(1);
@@ -338,13 +324,9 @@ public abstract class ClientAuthenticationTestCase extends JUnit4DistributedTest
getLogWriter().info("testInvalidCredentials: Using authinit: " + authInit);
// Start the servers
- int locPort1 = getLocatorPort();
- int locPort2 = getLocatorPort();
- String locString = getAndClearLocatorString();
-
- int port1 = createServer1(extraProps, javaProps, authenticator, locPort1, locString);
+ int port1 = createServer1(extraProps, javaProps, authenticator);
int port2 = server2
- .invoke(() -> createCacheServer(locPort2, locString, authenticator, extraProps, javaProps));
+ .invoke(() -> createCacheServer(authenticator, extraProps, javaProps));
// Start first client with valid credentials
Properties credentials1 = gen.getValidCredentials(1);
@@ -381,10 +363,7 @@ public abstract class ClientAuthenticationTestCase extends JUnit4DistributedTest
getLogWriter().info("testInvalidAuthInit: Using authenticator: " + authenticator);
// Start the server
- int locPort1 = getLocatorPort();
- String locString = getAndClearLocatorString();
-
- int port1 = createServer1(extraProps, javaProps, authenticator, locPort1, locString);
+ int port1 = createServer1(extraProps, javaProps, authenticator);
Properties credentials = gen.getValidCredentials(1);
getLogWriter().info(
"testInvalidAuthInit: For first client credentials: " + credentials + " : " + javaProps);
@@ -403,13 +382,9 @@ public abstract class ClientAuthenticationTestCase extends JUnit4DistributedTest
getLogWriter().info("testNoAuthInitWithCredentials: Using authenticator: " + authenticator);
// Start the servers
- int locPort1 = getLocatorPort();
- int locPort2 = getLocatorPort();
- String locString = getAndClearLocatorString();
-
- int port1 = createServer1(extraProps, javaProps, authenticator, locPort1, locString);
+ int port1 = createServer1(extraProps, javaProps, authenticator);
int port2 = server2
- .invoke(() -> createCacheServer(locPort2, locString, authenticator, extraProps, javaProps));
+ .invoke(() -> createCacheServer(authenticator, extraProps, javaProps));
// Start the clients with valid credentials
Properties credentials1 = gen.getValidCredentials(1);
@@ -449,10 +424,7 @@ public abstract class ClientAuthenticationTestCase extends JUnit4DistributedTest
getLogWriter().info("testInvalidAuthenticator: Using authinit: " + authInit);
// Start the server with invalid authenticator
- int locPort1 = getLocatorPort();
- String locString = getAndClearLocatorString();
-
- server1.invoke(() -> createCacheServer(locPort1, locString, "org.apache.geode.none", extraProps,
+ server1.invoke(() -> createCacheServer("org.apache.geode.none", extraProps,
javaProps, AUTHREQ_EXCEPTION));
}
@@ -467,14 +439,10 @@ public abstract class ClientAuthenticationTestCase extends JUnit4DistributedTest
getLogWriter().info("testNoAuthenticatorWithCredentials: Using authinit: " + authInit);
// Start the servers with no authenticator
- int locPort1 = getLocatorPort();
- int locPort2 = getLocatorPort();
- String locString = getAndClearLocatorString();
-
int port1 =
- server1.invoke(() -> createCacheServer(locPort1, locString, null, extraProps, javaProps));
+ server1.invoke(() -> createCacheServer(null, extraProps, javaProps));
int port2 =
- server2.invoke(() -> createCacheServer(locPort2, locString, null, extraProps, javaProps));
+ server2.invoke(() -> createCacheServer(null, extraProps, javaProps));
// Clients should connect successfully and work properly with
// valid/invalid credentials when none are required on the server side
@@ -510,12 +478,8 @@ public abstract class ClientAuthenticationTestCase extends JUnit4DistributedTest
getLogWriter().info("testCredentialsWithFailover: Using authinit: " + authInit);
// Start the first server
- int locPort1 = getLocatorPort();
- int locPort2 = getLocatorPort();
- String locString = getAndClearLocatorString();
-
int port1 = server1
- .invoke(() -> createCacheServer(locPort1, locString, authenticator, extraProps, javaProps));
+ .invoke(() -> createCacheServer(authenticator, extraProps, javaProps));
// Get a port for second server but do not start it
// This forces the clients to connect to the first server
@@ -542,7 +506,7 @@ public abstract class ClientAuthenticationTestCase extends JUnit4DistributedTest
// start the second one and stop the first server to force a failover
server2.invoke(
- () -> createCacheServer(locPort2, locString, port2, authenticator, extraProps, javaProps));
+ () -> createCacheServer(port2, authenticator, extraProps, javaProps));
server1.invoke(() -> closeCache());
// Perform some create/update operations from client1
@@ -595,12 +559,8 @@ public abstract class ClientAuthenticationTestCase extends JUnit4DistributedTest
getLogWriter().info("testCredentialsForNotifications: Using authinit: " + authInit);
// Start the first server
- int locPort1 = getLocatorPort();
- int locPort2 = getLocatorPort();
- String locString = getAndClearLocatorString();
-
int port1 = server1
- .invoke(() -> createCacheServer(locPort1, locString, authenticator, extraProps, javaProps));
+ .invoke(() -> createCacheServer(authenticator, extraProps, javaProps));
// Get a port for second server but do not start it
// This forces the clients to connect to the first server
@@ -635,7 +595,7 @@ public abstract class ClientAuthenticationTestCase extends JUnit4DistributedTest
// start the second one and stop the first server to force a failover
server2.invoke(
- () -> createCacheServer(locPort2, locString, port2, authenticator, extraProps, javaProps));
+ () -> createCacheServer(port2, authenticator, extraProps, javaProps));
server1.invoke(() -> closeCache());
// Wait for failover to complete
@@ -649,7 +609,7 @@ public abstract class ClientAuthenticationTestCase extends JUnit4DistributedTest
// Try to connect client1 with no credentials
// Verify that the creation of region throws security exception
final int p = server1.invoke(
- () -> createCacheServer(locPort1, locString, 0, authenticator, extraProps, javaProps));
+ () -> createCacheServer(0, authenticator, extraProps, javaProps));
if (gen.classCode().equals(CredentialGenerator.ClassCode.SSL)) {
// For SSL the exception may not come since the server can close socket
// before handshake message is sent from client. However exception
@@ -683,9 +643,9 @@ public abstract class ClientAuthenticationTestCase extends JUnit4DistributedTest
// first place (e.g. SSL).
if (authInit != null && authInit.length() > 0) {
final int p1 = server1.invoke(
- () -> createCacheServer(locPort1, locString, 0, authenticator, extraProps, javaProps));
+ () -> createCacheServer(0, authenticator, extraProps, javaProps));
final int p2 = server2.invoke(
- () -> createCacheServer(locPort2, locString, 0, authenticator, extraProps, javaProps));
+ () -> createCacheServer(0, authenticator, extraProps, javaProps));
client1.invoke(() -> createCacheClient(null, credentials1, javaProps1, p1, p2, 0, multiUser,
AUTHREQ_EXCEPTION));
@@ -703,9 +663,9 @@ public abstract class ClientAuthenticationTestCase extends JUnit4DistributedTest
// SSL) then skip it since this test is useless.
if (authenticator != null && authenticator.length() > 0) {
final int p1 = server1
- .invoke(() -> createCacheServer(locPort1, locString, 0, null, extraProps, javaProps));
+ .invoke(() -> createCacheServer(0, null, extraProps, javaProps));
final int p2 = server2
- .invoke(() -> createCacheServer(locPort2, locString, 0, null, extraProps, javaProps));
+ .invoke(() -> createCacheServer(0, null, extraProps, javaProps));
createClient1NoException(multiUser, authInit, p1, p2, credentials1, javaProps1);
createClient2NoException(multiUser, authInit, p1, p2, credentials2, javaProps2, zeroConns);
@@ -739,9 +699,9 @@ public abstract class ClientAuthenticationTestCase extends JUnit4DistributedTest
}
private int createServer1(final Properties extraProps, final Properties javaProps,
- final String authenticator, final int locPort1, final String locString) {
+ final String authenticator) {
return server1
- .invoke(() -> createCacheServer(locPort1, locString, authenticator, extraProps, javaProps));
+ .invoke(() -> createCacheServer(authenticator, extraProps, javaProps));
}
private void createClient1NoException(final boolean multiUser, final String authInit,
@@ -758,13 +718,6 @@ public abstract class ClientAuthenticationTestCase extends JUnit4DistributedTest
multiUser, AUTHREQ_EXCEPTION));
}
- private void createClient1WithException(final boolean multiUser, final String authInit,
- final int port1, final int port2, final Properties credentials2, final Properties javaProps2,
- final int zeroConns) {
- client1.invoke(() -> createCacheClient(authInit, credentials2, javaProps2, port1, port2,
- zeroConns, multiUser, AUTHFAIL_EXCEPTION));
- }
-
private void createClient2WithException(final boolean multiUser, final String authInit,
final int port1, final int port2, final Properties credentials2, final Properties javaProps2,
final int zeroConns) {
diff --git a/geode-core/src/distributedTest/java/org/apache/geode/security/ClientAuthenticationTestUtils.java b/geode-core/src/distributedTest/java/org/apache/geode/security/ClientAuthenticationTestUtils.java
index f8544ac..ea9f070 100644
--- a/geode-core/src/distributedTest/java/org/apache/geode/security/ClientAuthenticationTestUtils.java
+++ b/geode-core/src/distributedTest/java/org/apache/geode/security/ClientAuthenticationTestUtils.java
@@ -31,29 +31,28 @@ public abstract class ClientAuthenticationTestUtils {
protected ClientAuthenticationTestUtils() {}
- protected static Integer createCacheServer(final int locatorPort, final String locatorString,
- final String authenticator, final Properties extraProps, final Properties javaProps) {
- return createCacheServer(locatorPort, locatorString, 0, authenticator, extraProps, javaProps,
+ protected static Integer createCacheServer(final String authenticator,
+ final Properties extraProps, final Properties javaProps) {
+ return createCacheServer(0, authenticator, extraProps, javaProps,
NO_EXCEPTION);
}
- protected static Integer createCacheServer(final int locatorPort, final String locatorString,
- final int serverPort, final String authenticator, final Properties extraProps,
+ protected static Integer createCacheServer(final int serverPort, final String authenticator,
+ final Properties extraProps,
final Properties javaProps) {
- return createCacheServer(locatorPort, locatorString, serverPort, authenticator, extraProps,
+ return createCacheServer(serverPort, authenticator, extraProps,
javaProps, NO_EXCEPTION);
}
- protected static Integer createCacheServer(final int locatorPort, final String locatorString,
- final String authenticator, final Properties extraProps, final Properties javaProps,
+ protected static Integer createCacheServer(final String authenticator,
+ final Properties extraProps, final Properties javaProps,
final int expectedResult) {
-
- return createCacheServer(locatorPort, locatorString, 0, authenticator, extraProps, javaProps,
+ return createCacheServer(0, authenticator, extraProps, javaProps,
expectedResult);
}
- protected static Integer createCacheServer(final int locatorPort, final String locatorString,
- final int serverPort, final String authenticator, final Properties extraProps,
+ protected static Integer createCacheServer(final int serverPort, final String authenticator,
+ final Properties extraProps,
final Properties javaProps, int expectedResult) {
Properties authProps;
if (extraProps == null) {
@@ -65,8 +64,7 @@ public abstract class ClientAuthenticationTestUtils {
if (authenticator != null) {
authProps.setProperty(SECURITY_CLIENT_AUTHENTICATOR, authenticator);
}
- return SecurityTestUtils.createCacheServer(authProps, javaProps, locatorPort, locatorString,
- serverPort, expectedResult);
+ return SecurityTestUtils.createCacheServer(authProps, javaProps, serverPort, expectedResult);
}
protected static void createCacheClient(final String authInit, final Properties authProps,
diff --git a/geode-core/src/distributedTest/java/org/apache/geode/security/ClientMultiUserAuthzDUnitTest.java b/geode-core/src/distributedTest/java/org/apache/geode/security/ClientMultiUserAuthzDUnitTest.java
index f33b65e..b9adee5 100644
--- a/geode-core/src/distributedTest/java/org/apache/geode/security/ClientMultiUserAuthzDUnitTest.java
+++ b/geode-core/src/distributedTest/java/org/apache/geode/security/ClientMultiUserAuthzDUnitTest.java
@@ -30,7 +30,6 @@ import static org.apache.geode.security.SecurityTestUtils.doMultiUserPuts;
import static org.apache.geode.security.SecurityTestUtils.doMultiUserQueries;
import static org.apache.geode.security.SecurityTestUtils.doMultiUserQueryExecute;
import static org.apache.geode.security.SecurityTestUtils.doMultiUserRegionDestroys;
-import static org.apache.geode.security.SecurityTestUtils.getLocatorPort;
import static org.apache.geode.test.dunit.LogWriterUtils.getLogWriter;
import java.util.Iterator;
@@ -415,7 +414,7 @@ public class ClientMultiUserAuthzDUnitTest extends ClientAuthorizationTestCase {
private int createCacheServerOnVM(final VM server, final Properties javaProps,
final Properties serverProps) {
- return server.invoke(() -> ClientAuthorizationTestCase.createCacheServer(getLocatorPort(),
- serverProps, javaProps));
+ return server
+ .invoke(() -> ClientAuthorizationTestCase.createCacheServer(serverProps, javaProps));
}
}
diff --git a/geode-core/src/distributedTest/java/org/apache/geode/security/DeltaClientAuthorizationDUnitTest.java b/geode-core/src/distributedTest/java/org/apache/geode/security/DeltaClientAuthorizationDUnitTest.java
index 92c837b..ba924f5 100644
--- a/geode-core/src/distributedTest/java/org/apache/geode/security/DeltaClientAuthorizationDUnitTest.java
+++ b/geode-core/src/distributedTest/java/org/apache/geode/security/DeltaClientAuthorizationDUnitTest.java
@@ -20,7 +20,6 @@ import static org.apache.geode.security.SecurityTestUtils.NO_EXCEPTION;
import static org.apache.geode.security.SecurityTestUtils.REGION_NAME;
import static org.apache.geode.security.SecurityTestUtils.closeCache;
import static org.apache.geode.security.SecurityTestUtils.getCache;
-import static org.apache.geode.security.SecurityTestUtils.getLocatorPort;
import static org.apache.geode.test.dunit.Assert.assertEquals;
import static org.apache.geode.test.dunit.Assert.assertNotNull;
import static org.apache.geode.test.dunit.Assert.assertTrue;
@@ -123,11 +122,11 @@ public class DeltaClientAuthorizationDUnitTest extends ClientAuthorizationTestCa
}
private int createServer2(final Properties javaProps, final Properties serverProps) {
- return server2.invoke(() -> createCacheServer(getLocatorPort(), serverProps, javaProps));
+ return server2.invoke(() -> createCacheServer(serverProps, javaProps));
}
private int createServer1(final Properties javaProps, final Properties serverProps) {
- return server1.invoke(() -> createCacheServer(getLocatorPort(), serverProps, javaProps));
+ return server1.invoke(() -> createCacheServer(serverProps, javaProps));
}
private void doPuts(final int num, final int expectedResult) {
@@ -180,8 +179,6 @@ public class DeltaClientAuthorizationDUnitTest extends ClientAuthorizationTestCa
deltas[3].setByteArr(new byte[] {1, 2, 3, 4, 5});
deltas[4].setByteArr(new byte[] {1, 2, 3, 4, 5});
deltas[5].setByteArr(new byte[] {1, 2, 3, 4, 5});
- // deltas[6].setByteArr(new byte[] { 1, 2, 3, 4, 5 });
- // deltas[7].setByteArr(new byte[] { 1, 2, 3, 4, 5 });
deltas[3].resetDeltaStatus();
deltas[3].setDoubleVar(new Double(5));
@@ -194,7 +191,6 @@ public class DeltaClientAuthorizationDUnitTest extends ClientAuthorizationTestCa
deltas[4].setStr("str changed");
deltas[5].setStr("str changed");
deltas[6].setStr("str changed");
- // deltas[7].setStr("str changed");
deltas[5].resetDeltaStatus();
deltas[5].setIntVar(100);
diff --git a/geode-core/src/distributedTest/java/org/apache/geode/security/DeltaClientPostAuthorizationDUnitTest.java b/geode-core/src/distributedTest/java/org/apache/geode/security/DeltaClientPostAuthorizationDUnitTest.java
index 2f3947d..658bff0 100644
--- a/geode-core/src/distributedTest/java/org/apache/geode/security/DeltaClientPostAuthorizationDUnitTest.java
+++ b/geode-core/src/distributedTest/java/org/apache/geode/security/DeltaClientPostAuthorizationDUnitTest.java
@@ -20,7 +20,6 @@ import static org.apache.geode.security.SecurityTestUtils.OTHER_EXCEPTION;
import static org.apache.geode.security.SecurityTestUtils.closeCache;
import static org.apache.geode.security.SecurityTestUtils.concatProperties;
import static org.apache.geode.security.SecurityTestUtils.createCacheClient;
-import static org.apache.geode.security.SecurityTestUtils.getLocatorPort;
import static org.apache.geode.test.dunit.Assert.fail;
import static org.apache.geode.test.dunit.IgnoredException.addIgnoredException;
import static org.apache.geode.test.dunit.LogWriterUtils.getLogWriter;
@@ -105,8 +104,8 @@ public class DeltaClientPostAuthorizationDUnitTest extends ClientAuthorizationTe
// End of current operation block; execute all the operations on the servers with failover
if (opBlock.size() > 0) {
// Start the first server and execute the operation block
- server1.invoke(() -> ClientAuthorizationTestCase.createCacheServer(getLocatorPort(),
- port1, serverProps, javaProps));
+ server1.invoke(
+ () -> ClientAuthorizationTestCase.createCacheServer(port1, serverProps, javaProps));
server2.invoke(() -> closeCache());
executeOpBlock(opBlock, port1, port2, authInit, extraAuthProps, extraAuthzProps, tgen,
@@ -114,8 +113,8 @@ public class DeltaClientPostAuthorizationDUnitTest extends ClientAuthorizationTe
if (!currentOp.equals(OperationWithAction.OPBLOCK_NO_FAILOVER)) {
// Failover to the second server and run the block again
- server2.invoke(() -> ClientAuthorizationTestCase.createCacheServer(getLocatorPort(),
- port2, serverProps, javaProps));
+ server2.invoke(
+ () -> ClientAuthorizationTestCase.createCacheServer(port2, serverProps, javaProps));
server1.invoke(() -> closeCache());
executeOpBlock(opBlock, port1, port2, authInit, extraAuthProps, extraAuthzProps, tgen,
diff --git a/geode-core/src/distributedTest/java/org/apache/geode/security/P2PAuthenticationDUnitTest.java b/geode-core/src/distributedTest/java/org/apache/geode/security/P2PAuthenticationDUnitTest.java
index 202f546..f61d6e0 100644
--- a/geode-core/src/distributedTest/java/org/apache/geode/security/P2PAuthenticationDUnitTest.java
+++ b/geode-core/src/distributedTest/java/org/apache/geode/security/P2PAuthenticationDUnitTest.java
@@ -166,7 +166,7 @@ public class P2PAuthenticationDUnitTest extends JUnit4DistributedTestCase {
startTheLocator(props, gen.getJavaProperties(), locatorPort);
try {
- new SecurityTestUtils("tmp").createSystem(props, null);
+ new SecurityTestUtils().createSystem(props, null);
fail(
"AuthenticationFailedException was expected as the AuthInitialize object passed is incorrect");
@@ -198,7 +198,7 @@ public class P2PAuthenticationDUnitTest extends JUnit4DistributedTestCase {
startTheLocator(props, null, locatorPort);
try {
- new SecurityTestUtils("tmp").createSystem(props, null);
+ new SecurityTestUtils().createSystem(props, null);
fail(
"AuthenticationFailedException was expected as the Authenticator object passed is incorrect");
@@ -229,7 +229,7 @@ public class P2PAuthenticationDUnitTest extends JUnit4DistributedTestCase {
startTheLocator(props, null, locatorPort);
try {
- new SecurityTestUtils("tmp").createSystem(props, null);
+ new SecurityTestUtils().createSystem(props, null);
fail("AuthenticationFailedException was expected as no credentials are set");
} catch (GemFireSecurityException expected) {
@@ -299,7 +299,7 @@ public class P2PAuthenticationDUnitTest extends JUnit4DistributedTestCase {
props.putAll(gen.getInvalidCredentials(1));
try {
- new SecurityTestUtils("tmp").createSystem(props, null);
+ new SecurityTestUtils().createSystem(props, null);
fail("AuthenticationFailedException was expected as wrong credentials were passed");
} catch (GemFireSecurityException expected) {
@@ -530,7 +530,7 @@ public class P2PAuthenticationDUnitTest extends JUnit4DistributedTestCase {
}
private static void createDS(final Properties props, final Properties javaProps) {
- SecurityTestUtils tmpUtil = new SecurityTestUtils("tmp");
+ SecurityTestUtils tmpUtil = new SecurityTestUtils();
tmpUtil.createSystem(props, javaProps);
}
diff --git a/geode-cq/src/distributedTest/java/org/apache/geode/security/ClientAuthzObjectModDUnitTest.java b/geode-cq/src/distributedTest/java/org/apache/geode/security/ClientAuthzObjectModDUnitTest.java
index 92734c8..ec016ab 100755
--- a/geode-cq/src/distributedTest/java/org/apache/geode/security/ClientAuthzObjectModDUnitTest.java
+++ b/geode-cq/src/distributedTest/java/org/apache/geode/security/ClientAuthzObjectModDUnitTest.java
@@ -15,7 +15,6 @@
package org.apache.geode.security;
import static org.apache.geode.security.SecurityTestUtils.closeCache;
-import static org.apache.geode.security.SecurityTestUtils.getLocatorPort;
import java.util.ArrayList;
import java.util.List;
@@ -112,13 +111,13 @@ public class ClientAuthzObjectModDUnitTest extends ClientAuthorizationTestCase {
if (opBlock.size() > 0) {
// Start the first server and execute the operation block
port1 = server1.invoke("createCacheServer",
- () -> createCacheServer(getLocatorPort(), 0, serverProps, javaProps));
+ () -> createCacheServer(serverProps, javaProps));
server2.invoke("closeCache", () -> closeCache());
executeOpBlock(opBlock, port1, port2, authInit, extraProps, null, tgen, rnd);
if (!currentOp.equals(OperationWithAction.OPBLOCK_NO_FAILOVER)) {
// Failover to the second server and run the block again
port2 = server2.invoke("createCacheServer",
- () -> createCacheServer(getLocatorPort(), 0, serverProps, javaProps));
+ () -> createCacheServer(serverProps, javaProps));
server1.invoke("closeCache", () -> closeCache());
executeOpBlock(opBlock, port1, port2, authInit, extraProps, null, tgen, rnd);
}
diff --git a/geode-cq/src/distributedTest/java/org/apache/geode/security/ClientCQPostAuthorizationDUnitTest.java b/geode-cq/src/distributedTest/java/org/apache/geode/security/ClientCQPostAuthorizationDUnitTest.java
index 2cb5756..5b19c32 100644
--- a/geode-cq/src/distributedTest/java/org/apache/geode/security/ClientCQPostAuthorizationDUnitTest.java
+++ b/geode-cq/src/distributedTest/java/org/apache/geode/security/ClientCQPostAuthorizationDUnitTest.java
@@ -173,16 +173,15 @@ public class ClientCQPostAuthorizationDUnitTest extends ClientAuthorizationTestC
}
// Get ports for the servers
- int[] randomAvailableTCPPorts = AvailablePortHelper.getRandomAvailableTCPPorts(3);
+ int[] randomAvailableTCPPorts = AvailablePortHelper.getRandomAvailableTCPPorts(2);
int port1 = randomAvailableTCPPorts[0];
int port2 = randomAvailableTCPPorts[1];
- int locatorPort = randomAvailableTCPPorts[2];
// Close down any running servers
server1.invoke(() -> closeCache());
server2.invoke(() -> closeCache());
- server1.invoke(() -> createTheServerCache(serverProps, javaProps, locatorPort, port1));
+ server1.invoke(() -> createTheServerCache(serverProps, javaProps, port1));
client1.invoke(() -> createClientCache(javaProps2, authInit, authProps,
new int[] {port1, port2}, numOfUsers, postAuthzAllowed));
client2.invoke(() -> createClientCache(javaProps2, authInit, authProps,
@@ -211,7 +210,7 @@ public class ClientCQPostAuthorizationDUnitTest extends ClientAuthorizationTestC
0, !failover));
if (failover) {
- server2.invoke(() -> createTheServerCache(serverProps, javaProps, locatorPort, port2));
+ server2.invoke(() -> createTheServerCache(serverProps, javaProps, port2));
server1.invoke(() -> closeCache());
// Allow time for client1 to register its CQs on server2
@@ -225,9 +224,8 @@ public class ClientCQPostAuthorizationDUnitTest extends ClientAuthorizationTestC
}
private void createTheServerCache(final Properties serverProps, final Properties javaProps,
- final int locatorPort, final int serverPort) {
- SecurityTestUtils.createCacheServer(serverProps, javaProps, locatorPort, (String) null,
- serverPort, true, NO_EXCEPTION);
+ final int serverPort) {
+ SecurityTestUtils.createCacheServer(serverProps, javaProps, serverPort, true, NO_EXCEPTION);
}
private void createClientCache(final Properties javaProps, final String authInit,
diff --git a/geode-cq/src/distributedTest/java/org/apache/geode/security/ClientPostAuthorizationDUnitTest.java b/geode-cq/src/distributedTest/java/org/apache/geode/security/ClientPostAuthorizationDUnitTest.java
index 1d1ca25..31abe72 100644
--- a/geode-cq/src/distributedTest/java/org/apache/geode/security/ClientPostAuthorizationDUnitTest.java
+++ b/geode-cq/src/distributedTest/java/org/apache/geode/security/ClientPostAuthorizationDUnitTest.java
@@ -15,7 +15,6 @@
package org.apache.geode.security;
import static org.apache.geode.security.SecurityTestUtils.closeCache;
-import static org.apache.geode.security.SecurityTestUtils.getLocatorPort;
import static org.apache.geode.test.dunit.LogWriterUtils.getLogWriter;
import java.util.ArrayList;
@@ -88,14 +87,14 @@ public class ClientPostAuthorizationDUnitTest extends ClientAuthorizationTestCas
if (opBlock.size() > 0) {
// Start the first server and execute the operation block
server1
- .invoke(() -> createCacheServer(getLocatorPort(), port1, serverProps, javaProps));
+ .invoke(() -> createCacheServer(port1, serverProps, javaProps));
server2.invoke(() -> closeCache());
executeOpBlock(opBlock, port1, port2, authInit, extraAuthProps, extraAuthzProps, tgen,
rnd);
if (!currentOp.equals(OperationWithAction.OPBLOCK_NO_FAILOVER)) {
// Failover to the second server and run the block again
server2
- .invoke(() -> createCacheServer(getLocatorPort(), port2, serverProps, javaProps));
+ .invoke(() -> createCacheServer(port2, serverProps, javaProps));
server1.invoke(() -> closeCache());
executeOpBlock(opBlock, port1, port2, authInit, extraAuthProps, extraAuthzProps, tgen,
rnd);
@@ -153,14 +152,14 @@ public class ClientPostAuthorizationDUnitTest extends ClientAuthorizationTestCas
// End of current operation block; execute all the operations on the servers with failover
if (opBlock.size() > 0) {
// Start the first server and execute the operation block
- server1.invoke(() -> createCacheServer(getLocatorPort(), port1, serverProps, javaProps));
+ server1.invoke(() -> createCacheServer(port1, serverProps, javaProps));
server2.invoke(() -> closeCache());
executeOpBlock(opBlock, port1, port2, authInit, extraAuthProps, extraAuthzProps, tgen,
rnd);
if (!currentOp.equals(OperationWithAction.OPBLOCK_NO_FAILOVER)) {
// Failover to the second server and run the block again
server2
- .invoke(() -> createCacheServer(getLocatorPort(), port2, serverProps, javaProps));
+ .invoke(() -> createCacheServer(port2, serverProps, javaProps));
server1.invoke(() -> closeCache());
executeOpBlock(opBlock, port1, port2, authInit, extraAuthProps, extraAuthzProps, tgen,
rnd);
diff --git a/geode-cq/src/distributedTest/java/org/apache/geode/security/MultiUserAPIDUnitTest.java b/geode-cq/src/distributedTest/java/org/apache/geode/security/MultiUserAPIDUnitTest.java
index 35a72b6..8272190 100644
--- a/geode-cq/src/distributedTest/java/org/apache/geode/security/MultiUserAPIDUnitTest.java
+++ b/geode-cq/src/distributedTest/java/org/apache/geode/security/MultiUserAPIDUnitTest.java
@@ -272,14 +272,10 @@ public class MultiUserAPIDUnitTest extends ClientAuthorizationTestCase {
getLogWriter().info("testValidCredentials: Using authinit: " + authInit);
// Start the servers
- int locPort1 = SecurityTestUtils.getLocatorPort();
- int locPort2 = SecurityTestUtils.getLocatorPort();
- String locString = SecurityTestUtils.getAndClearLocatorString();
-
int port1 = server1
- .invoke(() -> createCacheServer(locPort1, locString, authenticator, extraProps, javaProps));
+ .invoke(() -> createCacheServer(authenticator, extraProps, javaProps));
int port2 = server2
- .invoke(() -> createCacheServer(locPort2, locString, authenticator, extraProps, javaProps));
+ .invoke(() -> createCacheServer(authenticator, extraProps, javaProps));
// Start the clients with valid credentials
Properties credentials1 = gen.getValidCredentials(1);
@@ -296,8 +292,8 @@ public class MultiUserAPIDUnitTest extends ClientAuthorizationTestCase {
multiUser, NO_EXCEPTION));
}
- private int createCacheServer(final int dsPort, final String locatorString,
- final String authenticator, final Properties extraProps, final Properties javaProps) {
+ private int createCacheServer(final String authenticator, final Properties extraProps,
+ final Properties javaProps) {
Properties authProps = new Properties();
if (extraProps != null) {
authProps.putAll(extraProps);
@@ -307,8 +303,7 @@ public class MultiUserAPIDUnitTest extends ClientAuthorizationTestCase {
authProps.setProperty(ConfigurationProperties.SECURITY_CLIENT_AUTHENTICATOR, authenticator);
}
- return SecurityTestUtils.createCacheServer(authProps, javaProps, dsPort, locatorString, 0,
- NO_EXCEPTION);
+ return SecurityTestUtils.createCacheServer(authProps, javaProps, 0, NO_EXCEPTION);
}
// a
diff --git a/geode-cq/src/distributedTest/java/org/apache/geode/security/MultiUserDurableCQAuthzDUnitTest.java b/geode-cq/src/distributedTest/java/org/apache/geode/security/MultiUserDurableCQAuthzDUnitTest.java
index 8ae75b5..66f1409 100644
--- a/geode-cq/src/distributedTest/java/org/apache/geode/security/MultiUserDurableCQAuthzDUnitTest.java
+++ b/geode-cq/src/distributedTest/java/org/apache/geode/security/MultiUserDurableCQAuthzDUnitTest.java
@@ -187,16 +187,15 @@ public class MultiUserDurableCQAuthzDUnitTest extends ClientAuthorizationTestCas
}
// Get ports for the servers
- int[] randomAvailableTCPPorts = AvailablePortHelper.getRandomAvailableTCPPorts(3);
+ int[] randomAvailableTCPPorts = AvailablePortHelper.getRandomAvailableTCPPorts(2);
int port1 = randomAvailableTCPPorts[0];
int port2 = randomAvailableTCPPorts[1];
- int locatorPort = randomAvailableTCPPorts[2];
// Close down any running servers
server1.invoke(() -> closeCache());
server2.invoke(() -> closeCache());
- server1.invoke(() -> createServerCache(serverProps, javaProps, locatorPort, port1));
+ server1.invoke(() -> createServerCache(serverProps, javaProps, port1));
client1.invoke(() -> createClientCache(javaProps2, authInit, authProps,
new int[] {port1, port2}, numOfUsers, durableClientId, postAuthzAllowed));
@@ -249,8 +248,8 @@ public class MultiUserDurableCQAuthzDUnitTest extends ClientAuthorizationTestCas
}
private void createServerCache(final Properties serverProps, final Properties javaProps,
- final int locatorPort, final int serverPort) {
- SecurityTestUtils.createCacheServer(serverProps, javaProps, locatorPort, null, serverPort, true,
+ final int serverPort) {
+ SecurityTestUtils.createCacheServer(serverProps, javaProps, serverPort, true,
NO_EXCEPTION);
}
diff --git a/geode-dunit/src/main/java/org/apache/geode/security/ClientAuthorizationTestCase.java b/geode-dunit/src/main/java/org/apache/geode/security/ClientAuthorizationTestCase.java
index bc42f3e..2bfae24 100644
--- a/geode-dunit/src/main/java/org/apache/geode/security/ClientAuthorizationTestCase.java
+++ b/geode-dunit/src/main/java/org/apache/geode/security/ClientAuthorizationTestCase.java
@@ -17,8 +17,6 @@ package org.apache.geode.security;
import static org.apache.geode.distributed.ConfigurationProperties.SECURITY_CLIENT_ACCESSOR;
import static org.apache.geode.distributed.ConfigurationProperties.SECURITY_CLIENT_ACCESSOR_PP;
import static org.apache.geode.distributed.ConfigurationProperties.SECURITY_CLIENT_AUTHENTICATOR;
-import static org.apache.geode.internal.AvailablePort.SOCKET;
-import static org.apache.geode.internal.AvailablePort.getRandomAvailablePort;
import static org.apache.geode.security.SecurityTestUtils.KEYS;
import static org.apache.geode.security.SecurityTestUtils.NOTAUTHZ_EXCEPTION;
import static org.apache.geode.security.SecurityTestUtils.NO_EXCEPTION;
@@ -225,27 +223,21 @@ public abstract class ClientAuthorizationTestCase extends JUnit4DistributedTestC
return concatProperties(new Properties[] {authProps, extraAuthProps, extraAuthzProps});
}
- protected static Integer createCacheServer(int locatorPort, final Properties authProps,
+ protected static Integer createCacheServer(final Properties authProps,
final Properties javaProps) {
- if (locatorPort == 0) {
- locatorPort = getRandomAvailablePort(SOCKET);
- }
- return SecurityTestUtils.createCacheServer(authProps, javaProps, locatorPort, null, 0, true,
+ return SecurityTestUtils.createCacheServer(authProps, javaProps, 0, true,
NO_EXCEPTION);
}
- protected static int createCacheServer(int locatorPort, final int serverPort,
- final Properties authProps, final Properties javaProps) {
- if (locatorPort == 0) {
- locatorPort = getRandomAvailablePort(SOCKET);
- }
+ protected static int createCacheServer(final int serverPort, final Properties authProps,
+ final Properties javaProps) {
Properties jprops = javaProps;
if (jprops == null) {
jprops = new Properties();
}
jprops.put(ConfigurationProperties.SERIALIZABLE_OBJECT_FILTER,
"org.apache.geode.security.templates.UsernamePrincipal");
- return SecurityTestUtils.createCacheServer(authProps, jprops, locatorPort, null, serverPort,
+ return SecurityTestUtils.createCacheServer(authProps, jprops, serverPort,
true, NO_EXCEPTION);
}
@@ -902,13 +894,9 @@ public abstract class ClientAuthorizationTestCase extends JUnit4DistributedTestC
// Get ports for the servers
List<Keeper> randomAvailableTCPPortKeepers =
- AvailablePortHelper.getRandomAvailableTCPPortKeepers(4);
- Keeper locator1PortKeeper = randomAvailableTCPPortKeepers.get(0);
- Keeper locator2PortKeeper = randomAvailableTCPPortKeepers.get(1);
- Keeper port1Keeper = randomAvailableTCPPortKeepers.get(2);
- Keeper port2Keeper = randomAvailableTCPPortKeepers.get(3);
- int locator1Port = locator1PortKeeper.getPort();
- int locator2Port = locator2PortKeeper.getPort();
+ AvailablePortHelper.getRandomAvailableTCPPortKeepers(2);
+ Keeper port1Keeper = randomAvailableTCPPortKeepers.get(0);
+ Keeper port2Keeper = randomAvailableTCPPortKeepers.get(1);
int port1 = port1Keeper.getPort();
int port2 = port2Keeper.getPort();
@@ -925,12 +913,11 @@ public abstract class ClientAuthorizationTestCase extends JUnit4DistributedTestC
// End of current operation block; execute all the operations on the servers with/without
// failover
if (opBlock.size() > 0) {
- locator1PortKeeper.release();
port1Keeper.release();
// Start the first server and execute the operation block
server1.invoke("createCacheServer", () -> ClientAuthorizationTestCase
- .createCacheServer(locator1Port, port1, serverProps, javaProps));
+ .createCacheServer(port1, serverProps, javaProps));
server2.invoke("closeCache", () -> closeCache());
executeOpBlock(opBlock, port1, port2, authInit, extraAuthProps, extraAuthzProps, tgen,
@@ -938,11 +925,10 @@ public abstract class ClientAuthorizationTestCase extends JUnit4DistributedTestC
if (!currentOp.equals(OperationWithAction.OPBLOCK_NO_FAILOVER)) {
// Failover to the second server and run the block again
- locator2PortKeeper.release();
port2Keeper.release();
server2.invoke("createCacheServer", () -> ClientAuthorizationTestCase
- .createCacheServer(locator2Port, port2, serverProps, javaProps));
+ .createCacheServer(port2, serverProps, javaProps));
server1.invoke("closeCache", () -> closeCache());
executeOpBlock(opBlock, port1, port2, authInit, extraAuthProps, extraAuthzProps, tgen,
diff --git a/geode-dunit/src/main/java/org/apache/geode/security/SecurityTestUtils.java b/geode-dunit/src/main/java/org/apache/geode/security/SecurityTestUtils.java
index 93bca0c..0f5e0fa 100644
--- a/geode-dunit/src/main/java/org/apache/geode/security/SecurityTestUtils.java
+++ b/geode-dunit/src/main/java/org/apache/geode/security/SecurityTestUtils.java
@@ -24,9 +24,6 @@ import static org.apache.geode.distributed.ConfigurationProperties.MCAST_PORT;
import static org.apache.geode.distributed.ConfigurationProperties.SECURITY_CLIENT_AUTHENTICATOR;
import static org.apache.geode.distributed.ConfigurationProperties.SECURITY_CLIENT_AUTH_INIT;
import static org.apache.geode.distributed.ConfigurationProperties.SECURITY_LOG_LEVEL;
-import static org.apache.geode.distributed.ConfigurationProperties.START_LOCATOR;
-import static org.apache.geode.internal.AvailablePort.SOCKET;
-import static org.apache.geode.internal.AvailablePort.getRandomAvailablePort;
import static org.apache.geode.test.dunit.Assert.assertEquals;
import static org.apache.geode.test.dunit.Assert.assertFalse;
import static org.apache.geode.test.dunit.Assert.assertNotNull;
@@ -140,7 +137,6 @@ public class SecurityTestUtils {
private static Locator locator = null;
private static Cache cache = null;
private static Properties currentJavaProps = null;
- private static String locatorString = null;
private static Pool pool = null;
private static boolean multiUserAuthMode = false;
@@ -149,9 +145,6 @@ public class SecurityTestUtils {
private static Region regionRef = null;
- public SecurityTestUtils(String name) { // TODO: delete
- }
-
/**
* @deprecated Please use {@link org.apache.geode.test.dunit.IgnoredException} instead
*/
@@ -190,27 +183,6 @@ public class SecurityTestUtils {
DynamicRegionFactory.get().open(new DynamicRegionFactory.Config(null, null, false, true));
}
- protected static int getLocatorPort() {
- int locatorPort = getRandomAvailablePort(SOCKET);
- String addr = getIPLiteral();
- if (locatorString == null) {
- locatorString = addr + "[" + locatorPort + ']';
- } else {
- locatorString += "," + addr + "[" + locatorPort + ']';
- }
- return locatorPort;
- }
-
- /**
- * Note that this clears the string after returning for convenience in reusing for other tests.
- * Hence it should normally be invoked only once for a test.
- */
- protected static String getAndClearLocatorString() {
- String locString = locatorString;
- locatorString = null;
- return locString;
- }
-
protected static Properties concatProperties(final Properties[] propsList) {
Properties props = new Properties();
for (int index = 0; index < propsList.length; ++index) {
@@ -221,43 +193,34 @@ public class SecurityTestUtils {
return props;
}
- protected static void registerExpectedExceptions(final String[] expectedExceptions) { // TODO:
- // delete
+ protected static void registerExpectedExceptions(final String[] expectedExceptions) {
SecurityTestUtils.ignoredExceptions = expectedExceptions;
}
protected static int createCacheServer(String authenticatorFactoryMethodName) {
Properties authProps = new Properties();
authProps.setProperty(SECURITY_CLIENT_AUTHENTICATOR, authenticatorFactoryMethodName);
- return createCacheServer(authProps, null, 0, null, 0, false, NO_EXCEPTION);
+ return createCacheServer(authProps, null, 0, false, NO_EXCEPTION);
}
protected static int createCacheServer(final Properties authProps, final Properties javaProps,
- final int locatorPort, final String locatorString, final int serverPort,
- final int expectedResult) {
- return createCacheServer(authProps, javaProps, locatorPort, locatorString, serverPort, false,
- expectedResult);
+ final int serverPort, final int expectedResult) {
+ return createCacheServer(authProps, javaProps, serverPort, false, expectedResult);
}
protected static int createCacheServer(Properties authProps, final Properties javaProps,
- final int locatorPort, final String locatorString, final int serverPort,
- final boolean setupDynamicRegionFactory, final int expectedResult) {
+ final int serverPort, final boolean setupDynamicRegionFactory, final int expectedResult) {
if (authProps == null) {
authProps = new Properties();
}
authProps.setProperty(MCAST_PORT, "0");
- if (locatorString != null && locatorString.length() > 0) {
- authProps.setProperty(LOCATORS, locatorString);
- authProps.setProperty(START_LOCATOR, getIPLiteral() + "[" + locatorPort + ']');
- } else {
- authProps.setProperty(LOCATORS, "localhost[" + getDUnitLocatorPort() + "]");
- }
+ authProps.setProperty(LOCATORS, "localhost[" + getDUnitLocatorPort() + "]");
authProps.setProperty(SECURITY_LOG_LEVEL, "finest");
getLogWriter().info("Set the server properties to: " + authProps);
getLogWriter().info("Set the java properties to: " + javaProps);
- SecurityTestUtils tmpInstance = new SecurityTestUtils("temp");
+ SecurityTestUtils tmpInstance = new SecurityTestUtils();
try {
tmpInstance.createSystem(authProps, javaProps);
} catch (AuthenticationRequiredException ex) {
@@ -378,7 +341,7 @@ public class SecurityTestUtils {
authProps.setProperty(SECURITY_CLIENT_AUTH_INIT, authInitModule);
}
- SecurityTestUtils tmpInstance = new SecurityTestUtils("temp");
+ SecurityTestUtils tmpInstance = new SecurityTestUtils();
tmpInstance.createSystem(authProps, javaProps);
AttributesFactory factory = new AttributesFactory();
@@ -518,7 +481,7 @@ public class SecurityTestUtils {
"org.apache.geode.security.templates.UsernamePrincipal");
}
- SecurityTestUtils tmpInstance = new SecurityTestUtils("temp");
+ SecurityTestUtils tmpInstance = new SecurityTestUtils();
tmpInstance.createSystem(props, javaProps);
AttributesFactory factory = new AttributesFactory();
diff --git a/geode-wan/src/distributedTest/java/org/apache/geode/internal/cache/wan/misc/NewWanAuthenticationDUnitTest.java b/geode-wan/src/distributedTest/java/org/apache/geode/internal/cache/wan/misc/NewWanAuthenticationDUnitTest.java
index df901b4..628f963 100644
--- a/geode-wan/src/distributedTest/java/org/apache/geode/internal/cache/wan/misc/NewWanAuthenticationDUnitTest.java
+++ b/geode-wan/src/distributedTest/java/org/apache/geode/internal/cache/wan/misc/NewWanAuthenticationDUnitTest.java
@@ -363,7 +363,7 @@ public class NewWanAuthenticationDUnitTest extends WANTestBase {
logger.info("Set the server properties to: " + authProps);
logger.info("Set the java properties to: " + javaProps);
- SecurityTestUtils tmpInstance = new SecurityTestUtils("temp");
+ SecurityTestUtils tmpInstance = new SecurityTestUtils();
DistributedSystem ds = tmpInstance.createSystem(authProps, (Properties) javaProps);
assertNotNull(ds);
assertTrue(ds.isConnected());