[
https://issues.apache.org/jira/browse/GEODE-3539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16274626#comment-16274626
]
ASF GitHub Bot commented on GEODE-3539:
---------------------------------------
jinmeiliao closed pull request #1111: GEODE-3539: enhance GfshCommandRule.
Rename method for consistency.
URL: https://github.com/apache/geode/pull/1111
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git
a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DescribeDiskStoreCommandIntegrationTest.java
b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DescribeDiskStoreCommandIntegrationTest.java
index 21f3f28ed7..890337b4f2 100644
---
a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DescribeDiskStoreCommandIntegrationTest.java
+++
b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DescribeDiskStoreCommandIntegrationTest.java
@@ -54,7 +54,7 @@ public static void beforeClass() throws Exception {
}
@ClassRule
- public static GfshCommandRule gfsh = new GfshCommandRule().setTimeout(1);
+ public static GfshCommandRule gfsh = new GfshCommandRule().withTimeout(1);
@Test
public void commandFailsWithoutOptions() throws Exception {
diff --git
a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ListDiskStoreCommandIntegrationTest.java
b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ListDiskStoreCommandIntegrationTest.java
index fa438716f0..7961f58a0f 100644
---
a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ListDiskStoreCommandIntegrationTest.java
+++
b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ListDiskStoreCommandIntegrationTest.java
@@ -40,7 +40,7 @@
.withName(MEMBER_NAME).withJMXManager().withAutoStart();
@Rule
- public GfshCommandRule gfsh = new GfshCommandRule().setTimeout(1);
+ public GfshCommandRule gfsh = new GfshCommandRule().withTimeout(1);
@Test
public void commandSucceedsWhenConnected() throws Exception {
diff --git
a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ListRegionIntegrationTest.java
b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ListRegionIntegrationTest.java
index 673ebf020c..297893fdd2 100644
---
a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ListRegionIntegrationTest.java
+++
b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ListRegionIntegrationTest.java
@@ -42,11 +42,6 @@
@Rule
public GfshCommandRule gfsh = new GfshCommandRule(server::getJmxPort,
PortType.jmxManager);
- @Before
- public void setup() {
- gfsh.setTimeout(2);
- }
-
@Test
public void commandFailsWhenNotConnected() throws Exception {
gfsh.disconnect();
diff --git
a/geode-core/src/test/java/org/apache/geode/test/junit/rules/GfshCommandRule.java
b/geode-core/src/test/java/org/apache/geode/test/junit/rules/GfshCommandRule.java
index fb94fa7f2e..6ab7908fe8 100644
---
a/geode-core/src/test/java/org/apache/geode/test/junit/rules/GfshCommandRule.java
+++
b/geode-core/src/test/java/org/apache/geode/test/junit/rules/GfshCommandRule.java
@@ -268,11 +268,8 @@ public File getWorkingDir() {
return workingDir;
}
- public GfshCommandRule setTimeout(int timeoutInSeconds) {
+ public GfshCommandRule withTimeout(int timeoutInSeconds) {
this.gfshTimeout = timeoutInSeconds;
- if (gfsh != null) {
- gfsh.setTimeout(timeoutInSeconds);
- }
return this;
}
----------------------------------------------------------------
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)