You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by je...@apache.org on 2017/10/06 21:18:55 UTC

[geode] 02/02: GEODE-3746: FunctionCommandsDUnitTest uses http as transport

This is an automated email from the ASF dual-hosted git repository.

jensdeppe pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git

commit d1ef59150748f34737574f55984b9c7e93f96b5a
Author: Jens Deppe <jd...@pivotal.io>
AuthorDate: Fri Oct 6 07:42:52 2017 -0700

    GEODE-3746: FunctionCommandsDUnitTest uses http as transport
---
 .../cli/commands/FunctionCommandsDUnitTest.java    |  8 ++++--
 .../cli/commands/CommandOverHttpDUnitTest.java     |  3 +--
 .../FunctionCommandsOverHttpDUnitTest.java         | 29 ++++++++++++++++++++++
 3 files changed, 36 insertions(+), 4 deletions(-)

diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/FunctionCommandsDUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/FunctionCommandsDUnitTest.java
index 9450d10..bcf71c2 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/FunctionCommandsDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/FunctionCommandsDUnitTest.java
@@ -109,7 +109,7 @@ public class FunctionCommandsDUnitTest {
       await().atMost(120, TimeUnit.SECONDS).until(() -> dsMXBean.getMemberCount() == 3);
     });
 
-    gfsh.connect(locator);
+    connectGfsh(locator);
   }
 
   private void registerFunction(Function function, MemberVM... vms) {
@@ -118,8 +118,12 @@ public class FunctionCommandsDUnitTest {
     }
   }
 
+  public void connectGfsh(MemberVM vm) throws Exception {
+    gfsh.connectAndVerify(vm.getJmxPort(), GfshShellConnectionRule.PortType.jmxManger);
+  }
+
   @Test
-  public void testExecuteFunctionOnRegion() {
+  public void testExecuteFunctionOnRegion() throws Exception {
     CommandResult result = gfsh.executeAndVerifyCommand(
         "execute function --id=" + TestFunction.TEST_FUNCTION1 + " --region=/" + REGION_ONE);
     assertThat(((JSONArray) result.getContent().get("Member ID/Name")).length()).isEqualTo(2);
diff --git a/geode-web/src/test/java/org/apache/geode/management/internal/cli/commands/CommandOverHttpDUnitTest.java b/geode-web/src/test/java/org/apache/geode/management/internal/cli/commands/CommandOverHttpDUnitTest.java
index 3999709..aae902d 100644
--- a/geode-web/src/test/java/org/apache/geode/management/internal/cli/commands/CommandOverHttpDUnitTest.java
+++ b/geode-web/src/test/java/org/apache/geode/management/internal/cli/commands/CommandOverHttpDUnitTest.java
@@ -27,8 +27,7 @@ import org.apache.geode.test.junit.runners.SuiteRunner;
 @Category({DistributedTest.class, SecurityTest.class})
 @RunWith(SuiteRunner.class)
 @Suite.SuiteClasses({ChangeLogLevelCommandDUnitTest.class, DeployWithGroupsDUnitTest.class,
-    DiskStoreCommandsDUnitTest.class, FunctionCommandsDUnitTest.class, GcCommandDUnitTest.class,
-    GemfireDataCommandsDUnitTest.class,
+    DiskStoreCommandsDUnitTest.class, GcCommandDUnitTest.class, GemfireDataCommandsDUnitTest.class,
     GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest.class,
     ListAndDescribeDiskStoreCommandsDUnitTest.class, ListIndexCommandDUnitTest.class,
     ShutdownCommandDUnitTest.class, QueueCommandsDUnitTest.class, ShellCommandsDUnitTest.class,
diff --git a/geode-web/src/test/java/org/apache/geode/management/internal/cli/commands/FunctionCommandsOverHttpDUnitTest.java b/geode-web/src/test/java/org/apache/geode/management/internal/cli/commands/FunctionCommandsOverHttpDUnitTest.java
new file mode 100644
index 0000000..12d93fa
--- /dev/null
+++ b/geode-web/src/test/java/org/apache/geode/management/internal/cli/commands/FunctionCommandsOverHttpDUnitTest.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package org.apache.geode.management.internal.cli.commands;
+
+import org.apache.geode.test.dunit.rules.MemberVM;
+import org.apache.geode.test.junit.categories.DistributedTest;
+import org.apache.geode.test.junit.rules.GfshShellConnectionRule;
+import org.junit.experimental.categories.Category;
+
+@Category(DistributedTest.class)
+public class FunctionCommandsOverHttpDUnitTest extends FunctionCommandsDUnitTest {
+  @Override
+  public void connectGfsh(MemberVM vm) throws Exception {
+    gfsh.connectAndVerify(vm.getHttpPort(), GfshShellConnectionRule.PortType.http);
+  }
+}

-- 
To stop receiving notification emails like this one, please contact
"commits@geode.apache.org" <co...@geode.apache.org>.