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:05:46 UTC
[geode] branch develop updated: GEODE-4136: Move http related test
to geode-web (#1319)
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 4d82995 GEODE-4136: Move http related test to geode-web (#1319)
4d82995 is described below
commit 4d829959d435740fb06f88f3b186290da328a803
Author: Jens Deppe <jd...@pivotal.io>
AuthorDate: Mon Jan 22 13:05:43 2018 -0800
GEODE-4136: Move http related test to geode-web (#1319)
---
.../internal/cli/commands/QueryCommandTest.java | 23 +++++------------
.../cli/commands/QueryCommandOverHttpTest.java | 30 ++++++++++++++++++++++
2 files changed, 37 insertions(+), 16 deletions(-)
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/QueryCommandTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/QueryCommandTest.java
index afc1dbc..f142992 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/QueryCommandTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/QueryCommandTest.java
@@ -31,8 +31,6 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.rules.TemporaryFolder;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
import org.apache.geode.cache.Cache;
import org.apache.geode.cache.Region;
@@ -40,18 +38,11 @@ import org.apache.geode.cache.RegionShortcut;
import org.apache.geode.management.internal.cli.shell.Gfsh;
import org.apache.geode.test.junit.categories.IntegrationTest;
import org.apache.geode.test.junit.rules.GfshCommandRule;
+import org.apache.geode.test.junit.rules.Server;
import org.apache.geode.test.junit.rules.ServerStarterRule;
@Category(IntegrationTest.class)
-@RunWith(Parameterized.class)
public class QueryCommandTest {
- @Parameterized.Parameters(name = "Connect via http: {0}")
- public static Object[] data() {
- return new Object[] {true, false};
- }
-
- @Parameterized.Parameter
- public boolean useHttp;
private final String DEFAULT_FETCH_SIZE = String.valueOf(Gfsh.DEFAULT_APP_FETCH_SIZE);
@@ -81,12 +72,12 @@ public class QueryCommandTest {
}
@Before
- public void connect() throws Exception {
- if (useHttp) {
- gfsh.connectAndVerify(server.getHttpPort(), GfshCommandRule.PortType.http);
- } else {
- gfsh.connectAndVerify(server.getJmxPort(), GfshCommandRule.PortType.jmxManager);
- }
+ public void before() throws Exception {
+ connect(server);
+ }
+
+ void connect(Server 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/QueryCommandOverHttpTest.java b/geode-web/src/test/java/org/apache/geode/management/internal/cli/commands/QueryCommandOverHttpTest.java
new file mode 100644
index 0000000..13c94b1
--- /dev/null
+++ b/geode-web/src/test/java/org/apache/geode/management/internal/cli/commands/QueryCommandOverHttpTest.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.junit.categories.IntegrationTest;
+import org.apache.geode.test.junit.rules.GfshCommandRule;
+import org.apache.geode.test.junit.rules.Server;
+
+@Category(IntegrationTest.class)
+public class QueryCommandOverHttpTest extends QueryCommandTest {
+
+ @Override
+ void connect(Server server) throws Exception {
+ gfsh.connectAndVerify(server.getHttpPort(), GfshCommandRule.PortType.http);
+ }
+}
--
To stop receiving notification emails like this one, please contact
jensdeppe@apache.org.