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 2018/01/22 21:03:38 UTC
[geode] branch develop updated: GEODE-4138: Move http related test
to geode-web (#1320)
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
The following commit(s) were added to refs/heads/develop by this push:
new 051349b GEODE-4138: Move http related test to geode-web (#1320)
051349b is described below
commit 051349b0992cd374bb6e3323d625812ca2deb709
Author: Jens Deppe <jd...@pivotal.io>
AuthorDate: Mon Jan 22 13:03:34 2018 -0800
GEODE-4138: Move http related test to geode-web (#1320)
---
.../cli/commands/ShutdownCommandDUnitTest.java | 24 ++++-------------
.../commands/ShutdownCommandOverHttpDUnitTest.java | 30 ++++++++++++++++++++++
2 files changed, 35 insertions(+), 19 deletions(-)
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ShutdownCommandDUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ShutdownCommandDUnitTest.java
index 156af51..e463702 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ShutdownCommandDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ShutdownCommandDUnitTest.java
@@ -17,8 +17,6 @@ package org.apache.geode.management.internal.cli.commands;
import static org.apache.geode.distributed.ConfigurationProperties.GROUPS;
import static org.apache.geode.distributed.ConfigurationProperties.LOG_FILE;
import static org.apache.geode.distributed.ConfigurationProperties.NAME;
-import static org.apache.geode.test.junit.rules.GfshCommandRule.PortType.http;
-import static org.apache.geode.test.junit.rules.GfshCommandRule.PortType.jmxManager;
import static org.assertj.core.api.Assertions.assertThat;
import java.util.Properties;
@@ -30,8 +28,6 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
import org.apache.geode.cache.Cache;
import org.apache.geode.cache.CacheClosedException;
@@ -44,7 +40,6 @@ import org.apache.geode.test.junit.rules.GfshCommandRule;
@Category(DistributedTest.class)
-@RunWith(Parameterized.class)
public class ShutdownCommandDUnitTest {
private static final String MANAGER_NAME = "Manager";
private static final String SERVER1_NAME = "Server1";
@@ -57,15 +52,6 @@ public class ShutdownCommandDUnitTest {
private MemberVM server1;
private MemberVM server2;
-
- @Parameterized.Parameter
- public static boolean useHttp;
-
- @Parameterized.Parameters
- public static Object[] data() {
- return new Object[] {true, false};
- }
-
@Rule
public ClusterStartupRule clusterStartupRule = new ClusterStartupRule();
@@ -92,11 +78,11 @@ public class ShutdownCommandDUnitTest {
server2Props.setProperty(GROUPS, GROUP2);
server2 = clusterStartupRule.startServerVM(2, server2Props, manager.getPort());
- if (useHttp) {
- gfsh.connectAndVerify(manager.getHttpPort(), http);
- } else {
- gfsh.connectAndVerify(manager.getJmxPort(), jmxManager);
- }
+ connect(manager);
+ }
+
+ void connect(MemberVM server) throws Exception {
+ gfsh.connectAndVerify(server.getJmxPort(), GfshCommandRule.PortType.jmxManager);
}
@Test
diff --git a/geode-web/src/test/java/org/apache/geode/management/internal/cli/commands/ShutdownCommandOverHttpDUnitTest.java b/geode-web/src/test/java/org/apache/geode/management/internal/cli/commands/ShutdownCommandOverHttpDUnitTest.java
new file mode 100644
index 0000000..13dd455
--- /dev/null
+++ b/geode-web/src/test/java/org/apache/geode/management/internal/cli/commands/ShutdownCommandOverHttpDUnitTest.java
@@ -0,0 +1,30 @@
+/*
+ * 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.junit.experimental.categories.Category;
+
+import org.apache.geode.test.dunit.rules.MemberVM;
+import org.apache.geode.test.junit.categories.DistributedTest;
+import org.apache.geode.test.junit.rules.GfshCommandRule;
+
+@Category(DistributedTest.class)
+public class ShutdownCommandOverHttpDUnitTest extends ShutdownCommandDUnitTest {
+
+ @Override
+ void connect(MemberVM server) throws Exception {
+ gfsh.connectAndVerify(server.getHttpPort(), GfshCommandRule.PortType.http);
+ }
+}
--
To stop receiving notification emails like this one, please contact
jensdeppe@apache.org.