geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jinmeil...@apache.org
Subject [geode] branch develop updated: GEODE-3539: enhance GfshCommandRule. Renmame method for consistency. (#1111)
Date Fri, 01 Dec 2017 17:00:34 GMT
This is an automated email from the ASF dual-hosted git repository.

jinmeiliao 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 b2d37ec  GEODE-3539: enhance GfshCommandRule. Renmame method for consistency. (#1111)
b2d37ec is described below

commit b2d37ecf15d6e83c238007226ec1d5b170d0fa11
Author: jinmeiliao <jiliao@pivotal.io>
AuthorDate: Fri Dec 1 09:00:31 2017 -0800

    GEODE-3539: enhance GfshCommandRule. Renmame method for consistency. (#1111)
    
    * reduce the default timeout
    * add ability to configure the timeout at construction time.
---
 .../cli/commands/DescribeDiskStoreCommandIntegrationTest.java        | 2 +-
 .../internal/cli/commands/ListDiskStoreCommandIntegrationTest.java   | 2 +-
 .../management/internal/cli/commands/ListRegionIntegrationTest.java  | 5 -----
 .../test/java/org/apache/geode/test/junit/rules/GfshCommandRule.java | 5 +----
 4 files changed, 3 insertions(+), 11 deletions(-)

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 21f3f28..890337b 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 class DescribeDiskStoreCommandIntegrationTest {
   }
 
   @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 fa43871..7961f58 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 @@ public class ListDiskStoreCommandIntegrationTest {
           .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 673ebf0..297893f 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 @@ public class ListRegionIntegrationTest {
   @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 fb94fa7..6ab7908 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 class GfshCommandRule extends DescribedExternalResource {
     return workingDir;
   }
 
-  public GfshCommandRule setTimeout(int timeoutInSeconds) {
+  public GfshCommandRule withTimeout(int timeoutInSeconds) {
     this.gfshTimeout = timeoutInSeconds;
-    if (gfsh != null) {
-      gfsh.setTimeout(timeoutInSeconds);
-    }
     return this;
   }
 

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

Mime
View raw message