[
https://issues.apache.org/jira/browse/GEODE-3539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16253898#comment-16253898
]
ASF GitHub Bot commented on GEODE-3539:
---------------------------------------
PurelyApplied commented on a change in pull request #1052: GEODE-3539: Add
missing test coverage for 'list regions' and 'describe region' commands
URL: https://github.com/apache/geode/pull/1052#discussion_r151210741
##########
File path:
geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DescribeRegionIntegrationTest.java
##########
@@ -0,0 +1,70 @@
+/*
+ * 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.ClassRule;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import org.apache.geode.cache.RegionShortcut;
+import org.apache.geode.test.junit.categories.IntegrationTest;
+import org.apache.geode.test.junit.rules.GfshShellConnectionRule;
+import org.apache.geode.test.junit.rules.GfshShellConnectionRule.PortType;
+import org.apache.geode.test.junit.rules.ServerStarterRule;
+
+@Category(IntegrationTest.class)
+public class DescribeRegionIntegrationTest {
+ private static String MEMBER_NAME = "test-server";
+ private static String REGION_NAME = "test-region";
+ private static String GROUP_NAME = "test-group";
+
+ @ClassRule
+ public static ServerStarterRule server = new ServerStarterRule()
+ .withRegion(RegionShortcut.REPLICATE, REGION_NAME).withName(MEMBER_NAME)
+ .withProperty("groups",
GROUP_NAME).withJMXManager().withEmbeddedLocator().withAutoStart();
+
+ @Rule
+ public GfshShellConnectionRule gfsh = new GfshShellConnectionRule();
+
+ @Test
+ public void commandFailsWhenNotConnected() throws Exception {
+ gfsh.executeAndAssertThat("describe region").statusIsError()
+ .containsOutput("was found but is not currently available");
+ }
+
+ @Test
+ public void commandFailsWithoutNameOption() throws Exception {
Review comment:
Would that be preferable to just lowering the timeout on `HeadlessGfsh` for
commands that should be executed quickly? I see that the timeout is otherwise
only set at instantiation of the `HeadlessGfsh` instance.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Add more test coverage for p2p commands
> ---------------------------------------
>
> Key: GEODE-3539
> URL: https://issues.apache.org/jira/browse/GEODE-3539
> Project: Geode
> Issue Type: Improvement
> Components: gfsh
> Reporter: Jinmei Liao
>
> Add more command tests that would eventually get rid of the legacy tests.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)