geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jinmeil...@apache.org
Subject [15/18] incubator-geode git commit: Merge branch 'feature/GEODE-1162' into feature/GEODE-17-2
Date Tue, 12 Apr 2016 21:16:40 GMT
Merge branch 'feature/GEODE-1162' into feature/GEODE-17-2

# Conflicts:
#	geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsDUnitTest.java
#	geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CliCommandTestBase.java


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/78b7d629
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/78b7d629
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/78b7d629

Branch: refs/heads/feature/GEODE-17-2
Commit: 78b7d629c7aeae10990c69ef0c61a0f9a7e1d795
Parents: 8c0532d dca07b1
Author: Jinmei Liao <jiliao@pivotal.io>
Authored: Tue Apr 12 09:08:14 2016 -0700
Committer: Jinmei Liao <jiliao@pivotal.io>
Committed: Tue Apr 12 09:08:14 2016 -0700

----------------------------------------------------------------------
 .../LauncherLifecycleCommandsDUnitTest.java     | 149 ++++--
 .../SharedConfigurationEndToEndDUnitTest.java   |  18 +-
 .../AbstractCommandsSupportJUnitTest.java       |  16 +-
 .../cli/commands/CliCommandTestBase.java        |  60 +--
 .../cli/commands/CommandOverHttpTests.java      |  56 ++
 .../cli/commands/ConfigCommandsDUnitTest.java   |  85 +--
 ...eateAlterDestroyRegionCommandsDUnitTest.java | 121 +++--
 .../cli/commands/DeployCommandsDUnitTest.java   |  33 +-
 .../commands/DiskStoreCommandsDUnitTest.java    |  83 +--
 .../commands/DiskStoreCommandsJUnitTest.java    |  19 +-
 .../cli/commands/FunctionCommandsDUnitTest.java |  97 ++--
 .../commands/GemfireDataCommandsDUnitTest.java  | 267 +++++-----
 ...WithCacheLoaderDuringCacheMissDUnitTest.java |  20 +-
 .../HTTPServiceSSLSupportJUnitTest.java         |  12 +-
 .../cli/commands/IndexCommandsDUnitTest.java    |  31 +-
 .../cli/commands/IndexCommandsJUnitTest.java    |  18 +-
 ...stAndDescribeDiskStoreCommandsDUnitTest.java |  23 +-
 .../ListAndDescribeRegionDUnitTest.java         |  50 +-
 .../cli/commands/ListIndexCommandDUnitTest.java |  29 +-
 .../cli/commands/MemberCommandsDUnitTest.java   |  60 ++-
 .../MiscellaneousCommandsDUnitTest.java         |  84 +--
 ...laneousCommandsExportLogsPart1DUnitTest.java |  37 +-
 ...laneousCommandsExportLogsPart2DUnitTest.java |  38 +-
 ...laneousCommandsExportLogsPart3DUnitTest.java |  39 +-
 ...laneousCommandsExportLogsPart4DUnitTest.java |  36 +-
 .../cli/commands/QueueCommandsDUnitTest.java    |  41 +-
 .../SharedConfigurationCommandsDUnitTest.java   |  55 +-
 .../cli/commands/ShellCommandsDUnitTest.java    |  47 +-
 .../cli/commands/ShowDeadlockDUnitTest.java     |  56 +-
 .../cli/commands/ShowMetricsDUnitTest.java      |  71 +--
 .../cli/commands/ShowStackTraceDUnitTest.java   |  43 +-
 .../cli/commands/UserCommandsDUnitTest.java     |  24 +-
 .../security/ClientAuthenticationDUnitTest.java |   6 +-
 .../ClientAuthenticationPart2DUnitTest.java     |   6 +-
 .../security/ClientAuthenticationTestCase.java  |   3 +
 .../security/ClientAuthorizationDUnitTest.java  |  10 +-
 .../security/ClientAuthorizationTestCase.java   |   2 +-
 .../security/ClientMultiUserAuthzDUnitTest.java |  10 +-
 .../DeltaClientAuthorizationDUnitTest.java      |  10 +-
 .../DeltaClientPostAuthorizationDUnitTest.java  |   8 +-
 .../security/GemFireSecurityExceptionTest.java  |   6 +-
 .../security/NotAuthorizedExceptionTest.java    |   6 +-
 .../security/P2PAuthenticationDUnitTest.java    |  10 +-
 .../gemfire/security/SecurityTestUtils.java     |  13 +-
 .../generator/AuthzCredentialGenerator.java     |  15 +-
 .../security/generator/CredentialGenerator.java |   3 +-
 .../generator/DummyCredentialGenerator.java     |   6 +-
 .../generator/LdapUserCredentialGenerator.java  |  15 +-
 .../generator/PKCSCredentialGenerator.java      |   8 +-
 .../generator/SSLCredentialGenerator.java       |   9 +-
 .../UserPasswordWithExtraPropsAuthInit.java     |   6 +-
 .../generator/XmlAuthzCredentialGenerator.java  |  10 +-
 .../security/templates/DummyAuthorization.java  |   8 +-
 .../templates/LdapUserAuthenticator.java        |   3 +-
 .../security/templates/PKCSAuthInit.java        |   3 +-
 .../security/templates/PKCSAuthenticator.java   |   3 +-
 .../security/templates/PKCSPrincipalTest.java   |   9 +-
 .../templates/UserPasswordAuthInit.java         |   4 +-
 .../templates/UsernamePrincipalTest.java        |   9 +-
 .../security/templates/XmlAuthorization.java    |  19 +-
 .../security/templates/XmlErrorHandler.java     |   5 +-
 .../gemfire/test/dunit/AsyncInvocation.java     | 426 ++++++++++-----
 .../gemfire/test/dunit/DistributedTestCase.java |   8 +-
 .../test/dunit/DistributedTestUtils.java        |   2 +-
 .../gemfire/test/dunit/ThreadUtils.java         |  13 +-
 .../com/gemstone/gemfire/test/dunit/VM.java     | 523 +++++++++----------
 .../com/gemstone/gemfire/test/dunit/Wait.java   |   2 +-
 .../cache/internal/JUnit4CacheTestCase.java     |   4 +-
 .../internal/JUnit3DistributedTestCase.java     |   9 +-
 .../internal/JUnit4DistributedTestCase.java     |  17 +-
 .../internal/tests/JUnit3BasicDUnitTest.java    | 189 -------
 .../JUnit3GetDefaultDiskStoreNameDUnitTest.java |  66 ---
 .../tests/JUnit3GetTestMethodNameDUnitTest.java |  53 --
 .../dunit/internal/tests/JUnit3VMDUnitTest.java | 192 -------
 .../internal/tests/JUnit4BasicDUnitTest.java    | 202 -------
 .../JUnit4GetDefaultDiskStoreNameDUnitTest.java |  65 ---
 .../tests/JUnit4GetTestMethodNameDUnitTest.java |  52 --
 .../dunit/internal/tests/JUnit4VMDUnitTest.java | 200 -------
 .../DistributedRestoreSystemProperties.java     |   3 +-
 .../gemfire/test/dunit/rules/RemoteInvoker.java |   3 +-
 .../gemfire/test/dunit/standalone/ChildVM.java  |   5 +-
 .../test/dunit/standalone/DUnitLauncher.java    |  10 +-
 .../test/dunit/standalone/RemoteDUnitVM.java    |   5 +-
 .../test/dunit/standalone/RemoteDUnitVMIF.java  |   4 +-
 .../test/dunit/tests/BasicDUnitTest.java        | 218 ++++----
 .../test/dunit/tests/JUnit4BasicDUnitTest.java  | 234 +++++++++
 .../JUnit4GetDefaultDiskStoreNameDUnitTest.java |  66 +++
 .../tests/JUnit4GetTestMethodNameDUnitTest.java |  53 ++
 ...ingGetPropertiesDisconnectsAllDUnitTest.java |  57 ++
 .../test/dunit/tests/JUnit4VMDUnitTest.java     | 201 +++++++
 .../cli/commands/ClientCommandsDUnitTest.java   | 199 +++----
 .../DurableClientCommandsDUnitTest.java         |  53 +-
 .../ClientAuthorizationTwoDUnitTest.java        |   8 +-
 .../security/ClientAuthzObjectModDUnitTest.java |   8 +-
 .../ClientCQPostAuthorizationDUnitTest.java     |   8 +-
 .../ClientPostAuthorizationDUnitTest.java       |  14 +-
 .../gemfire/security/MultiUserAPIDUnitTest.java |   8 +-
 .../MultiUserDurableCQAuthzDUnitTest.java       |   8 +-
 .../test/junit/categories/FlakyTest.java        |  24 +
 .../test/junit/categories/SecurityTest.java     |  23 +
 .../test/junit/categories/CategoryOne.java      |  20 +
 .../test/junit/categories/CategoryTest.java     | 169 ++++++
 .../test/junit/categories/CategoryTwo.java      |  20 +
 .../wan/wancommand/WANCommandTestBase.java      |  35 +-
 ...anCommandCreateGatewayReceiverDUnitTest.java |  45 +-
 .../WanCommandCreateGatewaySenderDUnitTest.java |  45 +-
 ...WanCommandGatewayReceiverStartDUnitTest.java |  39 +-
 .../WanCommandGatewayReceiverStopDUnitTest.java |  37 +-
 .../WanCommandGatewaySenderStartDUnitTest.java  |  44 +-
 .../WanCommandGatewaySenderStopDUnitTest.java   |  39 +-
 .../wan/wancommand/WanCommandListDUnitTest.java |  52 +-
 .../WanCommandPauseResumeDUnitTest.java         | 138 ++---
 .../wancommand/WanCommandStatusDUnitTest.java   |  79 +--
 .../ClusterConfigurationDUnitTest.java          |  64 ++-
 114 files changed, 3233 insertions(+), 2871 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/78b7d629/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsDUnitTest.java
index e41e118,4553140..a78e0ea
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsDUnitTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsDUnitTest.java
@@@ -799,6 -813,69 +813,69 @@@ public class LauncherLifecycleCommandsD
      assertEquals(Status.NOT_RESPONDING, locatorState.getStatus());
    }
  
+   @Ignore("Disabled until GEODE-1025, SGF-476 are resolved")
+   @Test
+   public void test013StartServerWithSpring() {
+     String pathname = (getClass().getSimpleName() + "_" + getTestMethodName());
+     File workingDirectory = new File(pathname);
+ 
+     assertTrue(workingDirectory.isDirectory() || workingDirectory.mkdir());
+ 
+     CommandStringBuilder command = new CommandStringBuilder(CliStrings.START_SERVER);
+ 
+     command.addOption(CliStrings.START_SERVER__NAME, getClass().getSimpleName().concat("_").concat(getTestMethodName()));
+     command.addOption(CliStrings.START_SERVER__USE_CLUSTER_CONFIGURATION, Boolean.FALSE.toString());
+     command.addOption(CliStrings.START_SERVER__LOG_LEVEL, "config");
+     command.addOption(CliStrings.START_SERVER__INCLUDE_SYSTEM_CLASSPATH);
+     command.addOption(CliStrings.START_SERVER__DISABLE_DEFAULT_SERVER);
+     command.addOption(CliStrings.START_SERVER__DIR, pathname);
+     command.addOption(CliStrings.START_SERVER__SPRING_XML_LOCATION, "spring/spring-gemfire-context.xml");
+ 
+     CommandResult result = executeCommand(command.toString());
+ 
+     assertNotNull(result);
+     assertEquals(Result.Status.OK, result.getStatus());
+ 
+     final ServerLauncher springGemFireServer = new ServerLauncher.Builder().setCommand(
+         ServerLauncher.Command.STATUS).setWorkingDirectory(
+         IOUtils.tryGetCanonicalPathElseGetAbsolutePath(workingDirectory)).build();
+ 
+     assertNotNull(springGemFireServer);
+ 
+     ServerState serverState = springGemFireServer.status();
 -    
++
+     assertNotNull(serverState);
+     assertEquals(Status.ONLINE, serverState.getStatus());
 -    
++
+     //Ensure the member name is what is set through spring
+     String logFile = serverState.getLogFile();
+     assertTrue("Log file name was not configured from spring context: " + logFile, logFile.contains("spring_server.log"));
+ 
+     // Now that the GemFire Server bootstrapped with Spring started up OK, stop it!
+     stopServer(springGemFireServer.getWorkingDirectory());
+ 
+     WaitCriterion waitCriteria = new WaitCriterion() {
+       @Override
+       public boolean done() {
+         ServerState serverState = springGemFireServer.status();
+         return (serverState != null && Status.NOT_RESPONDING.equals(serverState.getStatus()));
+       }
+ 
+       @Override
+       public String description() {
+         return "wait for the Locator to stop; the Locator will no longer respond after it
stops";
+       }
+     };
+ 
+     waitForCriterion(waitCriteria, TimeUnit.SECONDS.toMillis(15), TimeUnit.SECONDS.toMillis(5),
true);
+ 
+     serverState = springGemFireServer.status();
+ 
+     assertNotNull(serverState);
+     assertEquals(Status.NOT_RESPONDING, serverState.getStatus());
+   }
+ 
+   @Test
    public void test014GemFireServerJvmProcessTerminatesOnOutOfMemoryError() throws Exception
{
      int ports[] = AvailablePortHelper.getRandomAvailableTCPPorts(2);
      final int serverPort = ports[0];

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/78b7d629/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CliCommandTestBase.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CliCommandTestBase.java
index 21f9704,d8f3587..66a9995
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CliCommandTestBase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CliCommandTestBase.java
@@@ -28,13 -27,9 +27,10 @@@ import com.gemstone.gemfire.management.
  import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
  import com.gemstone.gemfire.management.internal.cli.shell.Gfsh;
  import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder;
 +import com.gemstone.gemfire.management.internal.security.JSONAuthorization;
  import com.gemstone.gemfire.test.dunit.Host;
- import com.gemstone.gemfire.test.dunit.LogWriterUtils;
- import com.gemstone.gemfire.test.dunit.SerializableCallable;
  import com.gemstone.gemfire.test.dunit.SerializableRunnable;
- import org.json.JSONException;
- import util.TestException;
+ import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
  
  import java.io.IOException;
  import java.io.PrintStream;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/78b7d629/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationDUnitTest.java
index bcfd195,961e844..9bc89f9
--- a/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationDUnitTest.java
@@@ -47,10 -47,10 +47,10 @@@ import com.gemstone.gemfire.test.junit.
   * of all operations with both valid and invalid credentials/modules with
   * pre-operation callbacks. It also checks for authorization in case of
   * failover.
 - * 
 + *
   * @since 5.5
   */
- @Category(DistributedTest.class)
+ @Category({ DistributedTest.class, SecurityTest.class })
  public class ClientAuthorizationDUnitTest extends ClientAuthorizationTestCase {
  
    @Override

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/78b7d629/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTestCase.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/78b7d629/geode-core/src/test/java/com/gemstone/gemfire/security/DeltaClientPostAuthorizationDUnitTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/78b7d629/geode-core/src/test/java/com/gemstone/gemfire/security/templates/XmlAuthorization.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/78b7d629/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/internal/JUnit4DistributedTestCase.java
----------------------------------------------------------------------


Mime
View raw message