You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by kl...@apache.org on 2016/02/05 01:16:16 UTC
[10/33] incubator-geode git commit: Cleanup
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationDUnitTest.java
index 7590e45..526f431 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationDUnitTest.java
@@ -35,7 +35,7 @@ import com.gemstone.gemfire.cache.operations.OperationContext.OperationCode;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.LogWriterSupport;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
import com.gemstone.gemfire.test.dunit.VM;
import templates.security.UserPasswordAuthInit;
@@ -113,7 +113,7 @@ public class ClientAuthorizationDUnitTest extends ClientAuthorizationTestBase {
fail("executeRIOpBlock: Unknown client number " + clientNum);
break;
}
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info(
"executeRIOpBlock: performing operation number ["
+ currentOp.getOpNum() + "]: " + currentOp);
if ((opFlags & OpFlags.USE_OLDCONN) == 0) {
@@ -161,7 +161,7 @@ public class ClientAuthorizationDUnitTest extends ClientAuthorizationTestBase {
extraAuthzProps });
// Start the client with valid credentials but allowed or disallowed to
// perform an operation
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info(
"executeRIOpBlock: For client" + clientNum + credentialsTypeStr
+ " credentials: " + opCredentials);
if (useThisVM) {
@@ -214,10 +214,10 @@ public class ClientAuthorizationDUnitTest extends ClientAuthorizationTestBase {
String authInit = cGen.getAuthInit();
String accessor = gen.getAuthorizationCallback();
- LogWriterSupport.getLogWriter().info("testAllowPutsGets: Using authinit: " + authInit);
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info("testAllowPutsGets: Using authinit: " + authInit);
+ LogWriterUtils.getLogWriter().info(
"testAllowPutsGets: Using authenticator: " + authenticator);
- LogWriterSupport.getLogWriter().info("testAllowPutsGets: Using accessor: " + accessor);
+ LogWriterUtils.getLogWriter().info("testAllowPutsGets: Using accessor: " + accessor);
// Start servers with all required properties
Properties serverProps = buildProperties(authenticator, accessor, false,
@@ -234,7 +234,7 @@ public class ClientAuthorizationDUnitTest extends ClientAuthorizationTestBase {
new OperationCode[] { OperationCode.PUT },
new String[] { regionName }, 1);
javaProps = cGen.getJavaProperties();
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info(
"testAllowPutsGets: For first client credentials: "
+ createCredentials);
client1.invoke(ClientAuthenticationDUnitTest.class, "createCacheClient",
@@ -246,7 +246,7 @@ public class ClientAuthorizationDUnitTest extends ClientAuthorizationTestBase {
new OperationCode[] { OperationCode.GET },
new String[] { regionName }, 2);
javaProps = cGen.getJavaProperties();
- LogWriterSupport.getLogWriter()
+ LogWriterUtils.getLogWriter()
.info(
"testAllowPutsGets: For second client credentials: "
+ getCredentials);
@@ -274,10 +274,10 @@ public class ClientAuthorizationDUnitTest extends ClientAuthorizationTestBase {
String authInit = cGen.getAuthInit();
String accessor = gen.getAuthorizationCallback();
- LogWriterSupport.getLogWriter().info("testDisallowPutsGets: Using authinit: " + authInit);
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info("testDisallowPutsGets: Using authinit: " + authInit);
+ LogWriterUtils.getLogWriter().info(
"testDisallowPutsGets: Using authenticator: " + authenticator);
- LogWriterSupport.getLogWriter().info("testDisallowPutsGets: Using accessor: " + accessor);
+ LogWriterUtils.getLogWriter().info("testDisallowPutsGets: Using accessor: " + accessor);
// Check that we indeed can obtain valid credentials not allowed to do
// gets
@@ -285,7 +285,7 @@ public class ClientAuthorizationDUnitTest extends ClientAuthorizationTestBase {
new OperationCode[] { OperationCode.PUT },
new String[] { regionName }, 1);
Properties createJavaProps = cGen.getJavaProperties();
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info(
"testDisallowPutsGets: For first client credentials: "
+ createCredentials);
Properties getCredentials = gen.getDisallowedCredentials(
@@ -293,7 +293,7 @@ public class ClientAuthorizationDUnitTest extends ClientAuthorizationTestBase {
new String[] { regionName }, 2);
Properties getJavaProps = cGen.getJavaProperties();
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info(
"testDisallowPutsGets: For second client disallowed GET credentials: "
+ getCredentials);
@@ -330,7 +330,7 @@ public class ClientAuthorizationDUnitTest extends ClientAuthorizationTestBase {
new OperationCode[] { OperationCode.GET },
new String[] { regionName }, 5);
getJavaProps = cGen.getJavaProperties();
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info(
"testDisallowPutsGets: For second client with GET credentials: "
+ getCredentials);
client2.invoke(ClientAuthenticationDUnitTest.class, "createCacheClient",
@@ -356,8 +356,8 @@ public class ClientAuthorizationDUnitTest extends ClientAuthorizationTestBase {
String authInit = cGen.getAuthInit();
String accessor = gen.getAuthorizationCallback();
- LogWriterSupport.getLogWriter().info("testInvalidAccessor: Using authinit: " + authInit);
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info("testInvalidAccessor: Using authinit: " + authInit);
+ LogWriterUtils.getLogWriter().info(
"testInvalidAccessor: Using authenticator: " + authenticator);
// Start server1 with invalid accessor
@@ -374,14 +374,14 @@ public class ClientAuthorizationDUnitTest extends ClientAuthorizationTestBase {
new OperationCode[] { OperationCode.PUT },
new String[] { regionName }, 3);
Properties createJavaProps = cGen.getJavaProperties();
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info(
"testInvalidAccessor: For first client CREATE credentials: "
+ createCredentials);
Properties getCredentials = gen.getAllowedCredentials(
new OperationCode[] { OperationCode.GET },
new String[] { regionName }, 7);
Properties getJavaProps = cGen.getJavaProperties();
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info(
"testInvalidAccessor: For second client GET credentials: "
+ getCredentials);
client1.invoke(ClientAuthenticationDUnitTest.class, "createCacheClient",
@@ -398,7 +398,7 @@ public class ClientAuthorizationDUnitTest extends ClientAuthorizationTestBase {
new Integer(1), new Integer(SecurityTestUtil.AUTHFAIL_EXCEPTION) });
// Now start server2 that has valid accessor
- LogWriterSupport.getLogWriter().info("testInvalidAccessor: Using accessor: " + accessor);
+ LogWriterUtils.getLogWriter().info("testInvalidAccessor: Using accessor: " + accessor);
serverProps = buildProperties(authenticator, accessor, false,
extraAuthProps, extraAuthzProps);
server2.invoke(ClientAuthorizationTestBase.class, "createCacheServer",
@@ -433,11 +433,11 @@ public class ClientAuthorizationDUnitTest extends ClientAuthorizationTestBase {
String authInit = cGen.getAuthInit();
String accessor = gen.getAuthorizationCallback();
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info(
"testPutsGetsWithFailover: Using authinit: " + authInit);
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info(
"testPutsGetsWithFailover: Using authenticator: " + authenticator);
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info(
"testPutsGetsWithFailover: Using accessor: " + accessor);
// Start servers with all required properties
@@ -456,7 +456,7 @@ public class ClientAuthorizationDUnitTest extends ClientAuthorizationTestBase {
new OperationCode[] { OperationCode.PUT },
new String[] { regionName }, 1);
Properties createJavaProps = cGen.getJavaProperties();
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info(
"testPutsGetsWithFailover: For first client credentials: "
+ createCredentials);
client1.invoke(ClientAuthenticationDUnitTest.class, "createCacheClient",
@@ -468,7 +468,7 @@ public class ClientAuthorizationDUnitTest extends ClientAuthorizationTestBase {
new OperationCode[] { OperationCode.GET },
new String[] { regionName }, 5);
Properties getJavaProps = cGen.getJavaProperties();
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info(
"testPutsGetsWithFailover: For second client credentials: "
+ getCredentials);
client2.invoke(ClientAuthenticationDUnitTest.class, "createCacheClient",
@@ -501,7 +501,7 @@ public class ClientAuthorizationDUnitTest extends ClientAuthorizationTestBase {
new String[] { regionName }, 9);
getJavaProps = cGen.getJavaProperties();
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info(
"testPutsGetsWithFailover: For second client disallowed GET credentials: "
+ noGetCredentials);
@@ -626,10 +626,10 @@ public class ClientAuthorizationDUnitTest extends ClientAuthorizationTestBase {
String authInit = cGen.getAuthInit();
String accessor = gen.getAuthorizationCallback();
- LogWriterSupport.getLogWriter().info("testAllOpsWithFailover: Using authinit: " + authInit);
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info("testAllOpsWithFailover: Using authinit: " + authInit);
+ LogWriterUtils.getLogWriter().info(
"testAllOpsWithFailover: Using authenticator: " + authenticator);
- LogWriterSupport.getLogWriter().info("testAllOpsWithFailover: Using accessor: " + accessor);
+ LogWriterUtils.getLogWriter().info("testAllOpsWithFailover: Using accessor: " + accessor);
// Start servers with all required properties
Properties serverProps = buildProperties(authenticator, accessor, false,
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTestBase.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTestBase.java b/gemfire-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTestBase.java
index d664dd5..665867f 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTestBase.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTestBase.java
@@ -61,7 +61,7 @@ import com.gemstone.gemfire.internal.cache.LocalRegion;
import com.gemstone.gemfire.internal.util.Callable;
import com.gemstone.gemfire.test.dunit.Assert;
import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.LogWriterSupport;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
import com.gemstone.gemfire.test.dunit.VM;
import com.gemstone.gemfire.test.dunit.Wait;
import com.gemstone.gemfire.test.dunit.WaitCriterion;
@@ -267,7 +267,7 @@ public class ClientAuthorizationTestBase extends DistributedTestCase {
policy = InterestResultPolicy.NONE;
}
final int numOps = indices.length;
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info(
"Got doOp for op: " + op.toString() + ", numOps: " + numOps
+ ", indices: " + indicesToString(indices) + ", expect: " + expectedResult);
boolean exceptionOccured = false;
@@ -307,7 +307,7 @@ public class ClientAuthorizationTestBase extends DistributedTestCase {
// server
if ((flags & OpFlags.CHECK_NOKEY) > 0) {
AbstractRegionEntry entry = (AbstractRegionEntry)((LocalRegion)region).getRegionEntry(searchKey);
- LogWriterSupport.getLogWriter().info(""+keyNum+": key is " + searchKey + " and entry is " + entry);
+ LogWriterUtils.getLogWriter().info(""+keyNum+": key is " + searchKey + " and entry is " + entry);
assertFalse(region.containsKey(searchKey));
}
else {
@@ -648,7 +648,7 @@ public class ClientAuthorizationTestBase extends DistributedTestCase {
}
catch (RegionDestroyedException ex) {
// harmless to ignore this
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info(
"doOp: sub-region " + region.getFullPath()
+ " already destroyed");
operationOmitted = true;
@@ -675,14 +675,14 @@ public class ClientAuthorizationTestBase extends DistributedTestCase {
|| ex instanceof QueryInvocationTargetException || ex instanceof CqException)
&& (expectedResult.intValue() == SecurityTestUtil.NOTAUTHZ_EXCEPTION)
&& (ex.getCause() instanceof NotAuthorizedException)) {
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info(
"doOp: Got expected NotAuthorizedException when doing operation ["
+ op + "] with flags " + OpFlags.description(flags)
+ ": " + ex.getCause());
continue;
}
else if (expectedResult.intValue() == SecurityTestUtil.OTHER_EXCEPTION) {
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info(
"doOp: Got expected exception when doing operation: "
+ ex.toString());
continue;
@@ -728,7 +728,7 @@ public class ClientAuthorizationTestBase extends DistributedTestCase {
fail("executeOpBlock: Unknown client number " + clientNum);
break;
}
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info(
"executeOpBlock: performing operation number ["
+ currentOp.getOpNum() + "]: " + currentOp);
if ((opFlags & OpFlags.USE_OLDCONN) == 0) {
@@ -764,7 +764,7 @@ public class ClientAuthorizationTestBase extends DistributedTestCase {
extraAuthzProps });
// Start the client with valid credentials but allowed or disallowed to
// perform an operation
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info(
"executeOpBlock: For client" + clientNum + credentialsTypeStr
+ " credentials: " + opCredentials);
boolean setupDynamicRegionFactory = (opFlags & OpFlags.ENABLE_DRF) > 0;
@@ -848,9 +848,9 @@ public class ClientAuthorizationTestBase extends DistributedTestCase {
String accessor = gen.getAuthorizationCallback();
TestAuthzCredentialGenerator tgen = new TestAuthzCredentialGenerator(gen);
- LogWriterSupport.getLogWriter().info(testName + ": Using authinit: " + authInit);
- LogWriterSupport.getLogWriter().info(testName + ": Using authenticator: " + authenticator);
- LogWriterSupport.getLogWriter().info(testName + ": Using accessor: " + accessor);
+ LogWriterUtils.getLogWriter().info(testName + ": Using authinit: " + authInit);
+ LogWriterUtils.getLogWriter().info(testName + ": Using authenticator: " + authenticator);
+ LogWriterUtils.getLogWriter().info(testName + ": Using accessor: " + accessor);
// Start servers with all required properties
Properties serverProps = buildProperties(authenticator, accessor, false,
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/security/ClientMultiUserAuthzDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/security/ClientMultiUserAuthzDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/security/ClientMultiUserAuthzDUnitTest.java
index 5566a23..b2b1245 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/security/ClientMultiUserAuthzDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/security/ClientMultiUserAuthzDUnitTest.java
@@ -35,7 +35,7 @@ import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.cache.execute.PRClientServerTestBase;
import com.gemstone.gemfire.internal.cache.functions.TestFunction;
import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterSupport;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
public class ClientMultiUserAuthzDUnitTest extends ClientAuthorizationTestBase {
@@ -76,10 +76,10 @@ public class ClientMultiUserAuthzDUnitTest extends ClientAuthorizationTestBase {
String authInit = cGen.getAuthInit();
String accessor = gen.getAuthorizationCallback();
- LogWriterSupport.getLogWriter().info("testOps1: Using authinit: " + authInit);
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info("testOps1: Using authinit: " + authInit);
+ LogWriterUtils.getLogWriter().info(
"testOps1: Using authenticator: " + authenticator);
- LogWriterSupport.getLogWriter().info("testOps1: Using accessor: " + accessor);
+ LogWriterUtils.getLogWriter().info("testOps1: Using accessor: " + accessor);
// Start servers with all required properties
Properties serverProps = buildProperties(authenticator, accessor, false,
@@ -150,21 +150,21 @@ public class ClientMultiUserAuthzDUnitTest extends ClientAuthorizationTestBase {
gen.getDisallowedCredentials(new OperationCode[] {client1OpCodes[1]},
new String[] {regionName}, 1)};
if (client1Credentials[0] == null || client1Credentials[0].size() == 0) {
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info(
"testOps1: Unable to obtain valid credentials with "
+ client1OpCodes[0].toString()
+ " permission; skipping this combination.");
return false;
}
if (client1Credentials[1] == null || client1Credentials[1].size() == 0) {
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info(
"testOps1: Unable to obtain valid credentials with no "
+ client1OpCodes[0].toString()
+ " permission; skipping this combination.");
return false;
}
javaProps = cGen.getJavaProperties();
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info(
"testOps1: For first client credentials: " + client1Credentials[0]
+ "\n" + client1Credentials[1]);
client1.invoke(SecurityTestUtil.class, "createCacheClientForMultiUserMode",
@@ -179,21 +179,21 @@ public class ClientMultiUserAuthzDUnitTest extends ClientAuthorizationTestBase {
gen.getDisallowedCredentials(client2OpCodes,
new String[] {regionName}, 9)};
if (client2Credentials[0] == null || client2Credentials[0].size() == 0) {
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info(
"testOps1: Unable to obtain valid credentials with "
+ client2OpCodes[0].toString()
+ " permission; skipping this combination.");
return false;
}
if (client2Credentials[1] == null || client2Credentials[1].size() == 0) {
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info(
"testOps1: Unable to obtain valid credentials with no "
+ client2OpCodes[0].toString()
+ " permission; skipping this combination.");
return false;
}
javaProps = cGen.getJavaProperties();
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info(
"testOps1: For second client credentials: " + client2Credentials[0]
+ "\n" + client2Credentials[1]);
if (bothClientsInMultiuserMode) {
@@ -355,9 +355,9 @@ public class ClientMultiUserAuthzDUnitTest extends ClientAuthorizationTestBase {
String authInit = cGen.getAuthInit();
String accessor = gen.getAuthorizationCallback();
- LogWriterSupport.getLogWriter().info("testOps2: Using authinit: " + authInit);
- LogWriterSupport.getLogWriter().info("testOps2: Using authenticator: " + authenticator);
- LogWriterSupport.getLogWriter().info("testOps2: Using accessor: " + accessor);
+ LogWriterUtils.getLogWriter().info("testOps2: Using authinit: " + authInit);
+ LogWriterUtils.getLogWriter().info("testOps2: Using authenticator: " + authenticator);
+ LogWriterUtils.getLogWriter().info("testOps2: Using accessor: " + accessor);
// Start servers with all required properties
Properties serverProps = buildProperties(authenticator, accessor, false,
@@ -384,7 +384,7 @@ public class ClientMultiUserAuthzDUnitTest extends ClientAuthorizationTestBase {
};
javaProps = cGen.getJavaProperties();
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info(
"testOps2: For first client credentials: " + client1Credentials[0]
+ "\n" + client1Credentials[1]);
client1.invoke(SecurityTestUtil.class,
@@ -401,7 +401,7 @@ public class ClientMultiUserAuthzDUnitTest extends ClientAuthorizationTestBase {
new String[] {regionName}, 9)};
javaProps = cGen.getJavaProperties();
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info(
"testOps2: For second client credentials: " + client2Credentials[0]
+ "\n" + client2Credentials[1]);
client2.invoke(SecurityTestUtil.class,
@@ -485,10 +485,10 @@ public class ClientMultiUserAuthzDUnitTest extends ClientAuthorizationTestBase {
String authInit = cGen.getAuthInit();
String accessor = gen.getAuthorizationCallback();
- LogWriterSupport.getLogWriter().info("testOpsWithClientsInDifferentModes: Using authinit: " + authInit);
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info("testOpsWithClientsInDifferentModes: Using authinit: " + authInit);
+ LogWriterUtils.getLogWriter().info(
"testOpsWithClientsInDifferentModes: Using authenticator: " + authenticator);
- LogWriterSupport.getLogWriter().info("testOpsWithClientsInDifferentModes: Using accessor: " + accessor);
+ LogWriterUtils.getLogWriter().info("testOpsWithClientsInDifferentModes: Using accessor: " + accessor);
// Start servers with all required properties
Properties serverProps = buildProperties(authenticator, accessor, false,
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/security/DeltaClientAuthorizationDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/security/DeltaClientAuthorizationDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/security/DeltaClientAuthorizationDUnitTest.java
index 661210c..f4cd68c 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/security/DeltaClientAuthorizationDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/security/DeltaClientAuthorizationDUnitTest.java
@@ -34,7 +34,7 @@ import com.gemstone.gemfire.cache.operations.OperationContext.OperationCode;
import com.gemstone.gemfire.internal.cache.PartitionedRegionLocalMaxMemoryDUnitTest.TestObject1;
import com.gemstone.gemfire.test.dunit.Assert;
import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterSupport;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
/**
* @since 6.1
@@ -136,10 +136,10 @@ public class DeltaClientAuthorizationDUnitTest extends
String authInit = cGen.getAuthInit();
String accessor = gen.getAuthorizationCallback();
- LogWriterSupport.getLogWriter().info("testAllowPutsGets: Using authinit: " + authInit);
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info("testAllowPutsGets: Using authinit: " + authInit);
+ LogWriterUtils.getLogWriter().info(
"testAllowPutsGets: Using authenticator: " + authenticator);
- LogWriterSupport.getLogWriter().info("testAllowPutsGets: Using accessor: " + accessor);
+ LogWriterUtils.getLogWriter().info("testAllowPutsGets: Using accessor: " + accessor);
// Start servers with all required properties
Properties serverProps = buildProperties(authenticator, accessor, false,
@@ -156,7 +156,7 @@ public class DeltaClientAuthorizationDUnitTest extends
new OperationCode[] { OperationCode.PUT },
new String[] { regionName }, 1);
javaProps = cGen.getJavaProperties();
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info(
"testAllowPutsGets: For first client credentials: "
+ createCredentials);
client1.invoke(ClientAuthenticationDUnitTest.class, "createCacheClient",
@@ -168,7 +168,7 @@ public class DeltaClientAuthorizationDUnitTest extends
new OperationCode[] { OperationCode.GET },
new String[] { regionName }, 2);
javaProps = cGen.getJavaProperties();
- LogWriterSupport.getLogWriter()
+ LogWriterUtils.getLogWriter()
.info(
"testAllowPutsGets: For second client credentials: "
+ getCredentials);
@@ -198,7 +198,7 @@ public class DeltaClientAuthorizationDUnitTest extends
}
catch (Exception ex) {
if (expectedResult.intValue() == SecurityTestUtil.OTHER_EXCEPTION) {
- LogWriterSupport.getLogWriter().info("Got expected exception when doing puts: " + ex);
+ LogWriterUtils.getLogWriter().info("Got expected exception when doing puts: " + ex);
}
else {
Assert.fail("Got unexpected exception when doing puts", ex);
@@ -216,7 +216,7 @@ public class DeltaClientAuthorizationDUnitTest extends
}
catch (NoAvailableServersException ex) {
if (expectedResult.intValue() == SecurityTestUtil.NO_AVAILABLE_SERVERS) {
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info(
"Got expected NoAvailableServers when doing puts: "
+ ex.getCause());
continue;
@@ -228,27 +228,27 @@ public class DeltaClientAuthorizationDUnitTest extends
catch (ServerConnectivityException ex) {
if ((expectedResult.intValue() == SecurityTestUtil.NOTAUTHZ_EXCEPTION)
&& (ex.getCause() instanceof NotAuthorizedException)) {
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info(
"Got expected NotAuthorizedException when doing puts: "
+ ex.getCause());
continue;
}
if ((expectedResult.intValue() == SecurityTestUtil.AUTHREQ_EXCEPTION)
&& (ex.getCause() instanceof AuthenticationRequiredException)) {
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info(
"Got expected AuthenticationRequiredException when doing puts: "
+ ex.getCause());
continue;
}
if ((expectedResult.intValue() == SecurityTestUtil.AUTHFAIL_EXCEPTION)
&& (ex.getCause() instanceof AuthenticationFailedException)) {
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info(
"Got expected AuthenticationFailedException when doing puts: "
+ ex.getCause());
continue;
}
else if (expectedResult.intValue() == SecurityTestUtil.OTHER_EXCEPTION) {
- LogWriterSupport.getLogWriter().info("Got expected exception when doing puts: " + ex);
+ LogWriterUtils.getLogWriter().info("Got expected exception when doing puts: " + ex);
}
else {
Assert.fail("Got unexpected exception when doing puts", ex);
@@ -256,7 +256,7 @@ public class DeltaClientAuthorizationDUnitTest extends
}
catch (Exception ex) {
if (expectedResult.intValue() == SecurityTestUtil.OTHER_EXCEPTION) {
- LogWriterSupport.getLogWriter().info("Got expected exception when doing puts: " + ex);
+ LogWriterUtils.getLogWriter().info("Got expected exception when doing puts: " + ex);
}
else {
Assert.fail("Got unexpected exception when doing puts", ex);
@@ -276,7 +276,7 @@ public class DeltaClientAuthorizationDUnitTest extends
}
catch (Exception ex) {
if (expectedResult.intValue() == SecurityTestUtil.OTHER_EXCEPTION) {
- LogWriterSupport.getLogWriter().info("Got expected exception when doing gets: " + ex);
+ LogWriterUtils.getLogWriter().info("Got expected exception when doing gets: " + ex);
}
else {
Assert.fail("Got unexpected exception when doing gets", ex);
@@ -297,7 +297,7 @@ public class DeltaClientAuthorizationDUnitTest extends
}
catch(NoAvailableServersException ex) {
if(expectedResult.intValue() == SecurityTestUtil.NO_AVAILABLE_SERVERS) {
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info(
"Got expected NoAvailableServers when doing puts: "
+ ex.getCause());
continue;
@@ -309,13 +309,13 @@ public class DeltaClientAuthorizationDUnitTest extends
catch (ServerConnectivityException ex) {
if ((expectedResult.intValue() == SecurityTestUtil.NOTAUTHZ_EXCEPTION)
&& (ex.getCause() instanceof NotAuthorizedException)) {
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info(
"Got expected NotAuthorizedException when doing gets: "
+ ex.getCause());
continue;
}
else if (expectedResult.intValue() == SecurityTestUtil.OTHER_EXCEPTION) {
- LogWriterSupport.getLogWriter().info("Got expected exception when doing gets: " + ex);
+ LogWriterUtils.getLogWriter().info("Got expected exception when doing gets: " + ex);
}
else {
Assert.fail("Got unexpected exception when doing gets", ex);
@@ -323,7 +323,7 @@ public class DeltaClientAuthorizationDUnitTest extends
}
catch (Exception ex) {
if (expectedResult.intValue() == SecurityTestUtil.OTHER_EXCEPTION) {
- LogWriterSupport.getLogWriter().info("Got expected exception when doing gets: " + ex);
+ LogWriterUtils.getLogWriter().info("Got expected exception when doing gets: " + ex);
}
else {
Assert.fail("Got unexpected exception when doing gets", ex);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/security/DeltaClientPostAuthorizationDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/security/DeltaClientPostAuthorizationDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/security/DeltaClientPostAuthorizationDUnitTest.java
index 8d288f7..bcffeb1 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/security/DeltaClientPostAuthorizationDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/security/DeltaClientPostAuthorizationDUnitTest.java
@@ -43,7 +43,7 @@ import com.gemstone.gemfire.internal.util.Callable;
import com.gemstone.gemfire.test.dunit.Assert;
import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.LogWriterSupport;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
import com.gemstone.gemfire.test.dunit.VM;
/**
@@ -137,11 +137,11 @@ public class DeltaClientPostAuthorizationDUnitTest extends
String accessor = gen.getAuthorizationCallback();
TestAuthzCredentialGenerator tgen = new TestAuthzCredentialGenerator(gen);
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info(
"testAllOpsNotifications: Using authinit: " + authInit);
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info(
"testAllOpsNotifications: Using authenticator: " + authenticator);
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info(
"testAllOpsNotifications: Using accessor: " + accessor);
// Start servers with all required properties
@@ -220,7 +220,7 @@ public class DeltaClientPostAuthorizationDUnitTest extends
fail("executeOpBlock: Unknown client number " + clientNum);
break;
}
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info(
"executeOpBlock: performing operation number ["
+ currentOp.getOpNum() + "]: " + currentOp);
if ((opFlags & OpFlags.USE_OLDCONN) == 0) {
@@ -256,7 +256,7 @@ public class DeltaClientPostAuthorizationDUnitTest extends
extraAuthzProps });
// Start the client with valid credentials but allowed or disallowed to
// perform an operation
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info(
"executeOpBlock: For client" + clientNum + credentialsTypeStr
+ " credentials: " + opCredentials);
boolean setupDynamicRegionFactory = (opFlags & OpFlags.ENABLE_DRF) > 0;
@@ -377,7 +377,7 @@ public class DeltaClientPostAuthorizationDUnitTest extends
policy = InterestResultPolicy.NONE;
}
final int numOps = indices.length;
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info(
"Got doOp for op: " + op.toString() + ", numOps: " + numOps
+ ", indices: " + indicesToString(indices) + ", expect: " + expectedResult);
boolean exceptionOccured = false;
@@ -515,14 +515,14 @@ public class DeltaClientPostAuthorizationDUnitTest extends
|| ex instanceof QueryInvocationTargetException || ex instanceof CqException)
&& (expectedResult.intValue() == SecurityTestUtil.NOTAUTHZ_EXCEPTION)
&& (ex.getCause() instanceof NotAuthorizedException)) {
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info(
"doOp: Got expected NotAuthorizedException when doing operation ["
+ op + "] with flags " + OpFlags.description(flags)
+ ": " + ex.getCause());
continue;
}
else if (expectedResult.intValue() == SecurityTestUtil.OTHER_EXCEPTION) {
- LogWriterSupport.getLogWriter().info(
+ LogWriterUtils.getLogWriter().info(
"doOp: Got expected exception when doing operation: "
+ ex.toString());
continue;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/security/P2PAuthenticationDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/security/P2PAuthenticationDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/security/P2PAuthenticationDUnitTest.java
index e8dea76..07bd7c7 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/security/P2PAuthenticationDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/security/P2PAuthenticationDUnitTest.java
@@ -41,8 +41,8 @@ import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.test.dunit.DistributedTestCase;
import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.LogWriterSupport;
-import com.gemstone.gemfire.test.dunit.NetworkSupport;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
+import com.gemstone.gemfire.test.dunit.NetworkUtils;
import com.gemstone.gemfire.test.dunit.VM;
import com.gemstone.gemfire.test.dunit.Wait;
@@ -98,7 +98,7 @@ public class P2PAuthenticationDUnitTest extends DistributedTestCase {
Properties props = new Properties();
props.setProperty(DistributionConfig.MCAST_PORT_NAME, "26753");
props.setProperty(DistributionConfig.LOCATORS_NAME,
- NetworkSupport.getIPLiteral() + "[" + port + "]");
+ NetworkUtils.getIPLiteral() + "[" + port + "]");
props.setProperty(DistributionConfig.SECURITY_PEER_AUTH_INIT_NAME,
"templates.security.UserPasswordAuthInit.create");
props.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
@@ -115,7 +115,7 @@ public class P2PAuthenticationDUnitTest extends DistributedTestCase {
props = new Properties();
props.setProperty(DistributionConfig.MCAST_PORT_NAME, "26753");
props.setProperty(DistributionConfig.LOCATORS_NAME,
- NetworkSupport.getIPLiteral() +"[" + port + "]");
+ NetworkUtils.getIPLiteral() +"[" + port + "]");
props.setProperty(DistributionConfig.SECURITY_PEER_AUTHENTICATOR_NAME,
"templates.security.LdapUserAuthenticator.create");
props.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
@@ -166,7 +166,7 @@ public class P2PAuthenticationDUnitTest extends DistributedTestCase {
}
String authInit = " Incorrect_AuthInitialize";
int port = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
- final String locators = NetworkSupport.getIPLiteral() + "[" + port + "]";
+ final String locators = NetworkUtils.getIPLiteral() + "[" + port + "]";
props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
props.setProperty(DistributionConfig.LOCATORS_NAME, locators);
setProperty(props, DistributionConfig.SECURITY_PEER_AUTH_INIT_NAME,
@@ -177,7 +177,7 @@ public class P2PAuthenticationDUnitTest extends DistributedTestCase {
getUniqueName(), new Integer(port), props, javaProps,
expectedExceptions});
- LogWriter dsLogger = LogWriterSupport.createLogWriter(props);
+ LogWriter dsLogger = LogWriterUtils.createLogWriter(props);
SecurityTestUtil.addExpectedExceptions(expectedExceptions, dsLogger);
try {
new SecurityTestUtil("tmp").createSystem(props, null);
@@ -204,7 +204,7 @@ public class P2PAuthenticationDUnitTest extends DistributedTestCase {
props = new Properties();
}
int port = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
- final String locators = NetworkSupport.getIPLiteral() +"["+port+"]";
+ final String locators = NetworkUtils.getIPLiteral() +"["+port+"]";
props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
props.setProperty(DistributionConfig.LOCATORS_NAME, locators);
setProperty(props, DistributionConfig.SECURITY_PEER_AUTH_INIT_NAME,
@@ -215,7 +215,7 @@ public class P2PAuthenticationDUnitTest extends DistributedTestCase {
getUniqueName(), new Integer(port), props, javaProps,
expectedExceptions });
- LogWriter dsLogger = LogWriterSupport.createLogWriter(props);
+ LogWriter dsLogger = LogWriterUtils.createLogWriter(props);
SecurityTestUtil.addExpectedExceptions(expectedExceptions, dsLogger);
try {
new SecurityTestUtil("tmp").createSystem(props, javaProps);
@@ -244,7 +244,7 @@ public class P2PAuthenticationDUnitTest extends DistributedTestCase {
props = new Properties();
}
int port = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
- final String locators = NetworkSupport.getIPLiteral() +"["+port+"]";
+ final String locators = NetworkUtils.getIPLiteral() +"["+port+"]";
props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
props.setProperty(DistributionConfig.LOCATORS_NAME, locators);
setProperty(props, DistributionConfig.SECURITY_PEER_AUTH_INIT_NAME,
@@ -255,7 +255,7 @@ public class P2PAuthenticationDUnitTest extends DistributedTestCase {
getUniqueName(), new Integer(port), props, javaProps,
expectedExceptions });
- LogWriter dsLogger = LogWriterSupport.createLogWriter(props);
+ LogWriter dsLogger = LogWriterUtils.createLogWriter(props);
SecurityTestUtil.addExpectedExceptions(expectedExceptions, dsLogger);
try {
new SecurityTestUtil("tmp").createSystem(props, null);
@@ -282,7 +282,7 @@ public class P2PAuthenticationDUnitTest extends DistributedTestCase {
props = new Properties();
}
int port = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
- final String locators = NetworkSupport.getIPLiteral() +"["+port+"]";
+ final String locators = NetworkUtils.getIPLiteral() +"["+port+"]";
props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
props.setProperty(DistributionConfig.LOCATORS_NAME, locators);
setProperty(props, DistributionConfig.SECURITY_PEER_AUTH_INIT_NAME,
@@ -320,7 +320,7 @@ public class P2PAuthenticationDUnitTest extends DistributedTestCase {
props = new Properties();
}
int port = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
- final String locators = NetworkSupport.getIPLiteral() +"["+port+"]";
+ final String locators = NetworkUtils.getIPLiteral() +"["+port+"]";
props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
props.setProperty(DistributionConfig.LOCATORS_NAME, locators);
setProperty(props, DistributionConfig.SECURITY_PEER_AUTH_INIT_NAME,
@@ -340,7 +340,7 @@ public class P2PAuthenticationDUnitTest extends DistributedTestCase {
javaProps = gen.getJavaProperties();
props.putAll(credentials);
- LogWriter dsLogger = LogWriterSupport.createLogWriter(props);
+ LogWriter dsLogger = LogWriterUtils.createLogWriter(props);
SecurityTestUtil.addExpectedExceptions(expectedExceptions, dsLogger);
try {
new SecurityTestUtil("tmp").createSystem(props, javaProps);
@@ -402,7 +402,7 @@ public class P2PAuthenticationDUnitTest extends DistributedTestCase {
// Start the locator with the LDAP authenticator
Properties props = new Properties();
int port = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
- final String locators = NetworkSupport.getIPLiteral() +"["+port+"]";
+ final String locators = NetworkUtils.getIPLiteral() +"["+port+"]";
setProperty(props, DistributionConfig.SECURITY_PEER_AUTH_INIT_NAME,
authInit);
setProperty(props, DistributionConfig.SECURITY_PEER_AUTHENTICATOR_NAME,
@@ -516,7 +516,7 @@ public class P2PAuthenticationDUnitTest extends DistributedTestCase {
// Start the locator with the Dummy authenticator
Properties props = new Properties();
int port = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
- final String locators = NetworkSupport.getIPLiteral() +"["+port+"]";
+ final String locators = NetworkUtils.getIPLiteral() +"["+port+"]";
setProperty(props, DistributionConfig.SECURITY_PEER_AUTH_INIT_NAME,
authInit);
setProperty(props, DistributionConfig.SECURITY_PEER_AUTHENTICATOR_NAME,
@@ -552,7 +552,7 @@ public class P2PAuthenticationDUnitTest extends DistributedTestCase {
props.putAll(credentials);
props.putAll(extraProps);
- LogWriter dsLogger = LogWriterSupport.createLogWriter(props);
+ LogWriter dsLogger = LogWriterUtils.createLogWriter(props);
SecurityTestUtil.addExpectedExceptions(
new String[] { IllegalArgumentException.class.getName() }, dsLogger);
try {