You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by js...@apache.org on 2017/10/31 18:02:21 UTC
[geode] branch develop updated: GEODE-3872: Remove executeAndVerify
method
This is an automated email from the ASF dual-hosted git repository.
jstewart 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 5055d01 GEODE-3872: Remove executeAndVerify method
5055d01 is described below
commit 5055d011e5c2082f24fa738feb0031d5bf3a933f
Author: Jared Stewart <js...@pivotal.io>
AuthorDate: Mon Oct 30 11:03:08 2017 -0700
GEODE-3872: Remove executeAndVerify method
---
.../CreateRegionCommandIntegrationTest.java | 28 ++++++++++++----------
.../test/junit/rules/GfshShellConnectionRule.java | 14 -----------
2 files changed, 16 insertions(+), 26 deletions(-)
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateRegionCommandIntegrationTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateRegionCommandIntegrationTest.java
index d4e9ab5..ce580a5 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateRegionCommandIntegrationTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateRegionCommandIntegrationTest.java
@@ -496,8 +496,9 @@ public class CreateRegionCommandIntegrationTest {
@Test
public void testEvictionAttributesForLRUHeap() throws Exception {
- gfsh.executeAndVerifyCommand(
- "create region --name=FOO --type=REPLICATE --eviction-action=local-destroy");
+ gfsh.executeAndAssertThat(
+ "create region --name=FOO --type=REPLICATE --eviction-action=local-destroy")
+ .statusIsSuccess();
Region foo = server.getCache().getRegion("/FOO");
assertThat(foo.getAttributes().getEvictionAttributes().getAction())
@@ -505,13 +506,14 @@ public class CreateRegionCommandIntegrationTest {
assertThat(foo.getAttributes().getEvictionAttributes().getAlgorithm())
.isEqualTo(EvictionAlgorithm.LRU_HEAP);
- gfsh.executeAndVerifyCommand("destroy region --name=/FOO");
+ gfsh.executeAndAssertThat("destroy region --name=/FOO").statusIsSuccess();
}
@Test
public void testEvictionAttributesForLRUEntry() throws Exception {
- gfsh.executeAndVerifyCommand(
- "create region --name=FOO --type=REPLICATE --eviction-entry-count=1001 --eviction-action=overflow-to-disk");
+ gfsh.executeAndAssertThat(
+ "create region --name=FOO --type=REPLICATE --eviction-entry-count=1001 --eviction-action=overflow-to-disk")
+ .statusIsSuccess();
Region foo = server.getCache().getRegion("/FOO");
assertThat(foo.getAttributes().getEvictionAttributes().getAction())
@@ -520,13 +522,14 @@ public class CreateRegionCommandIntegrationTest {
.isEqualTo(EvictionAlgorithm.LRU_ENTRY);
assertThat(foo.getAttributes().getEvictionAttributes().getMaximum()).isEqualTo(1001);
- gfsh.executeAndVerifyCommand("destroy region --name=/FOO");
+ gfsh.executeAndAssertThat("destroy region --name=/FOO").statusIsSuccess();
}
@Test
public void testEvictionAttributesForLRUMemory() throws Exception {
- gfsh.executeAndVerifyCommand(
- "create region --name=FOO --type=REPLICATE --eviction-max-memory=1001 --eviction-action=overflow-to-disk");
+ gfsh.executeAndAssertThat(
+ "create region --name=FOO --type=REPLICATE --eviction-max-memory=1001 --eviction-action=overflow-to-disk")
+ .statusIsSuccess();
Region foo = server.getCache().getRegion("/FOO");
assertThat(foo.getAttributes().getEvictionAttributes().getAction())
@@ -535,14 +538,15 @@ public class CreateRegionCommandIntegrationTest {
.isEqualTo(EvictionAlgorithm.LRU_MEMORY);
assertThat(foo.getAttributes().getEvictionAttributes().getMaximum()).isEqualTo(1001);
- gfsh.executeAndVerifyCommand("destroy region --name=/FOO");
+ gfsh.executeAndAssertThat("destroy region --name=/FOO").statusIsSuccess();
}
@Test
public void testEvictionAttributesForSizer() throws Exception {
- gfsh.executeAndVerifyCommand(
+ gfsh.executeAndAssertThat(
"create region --name=FOO --type=REPLICATE --eviction-max-memory=1001 --eviction-action=overflow-to-disk --eviction-object-sizer="
- + TestObjectSizer.class.getName());
+ + TestObjectSizer.class.getName())
+ .statusIsSuccess();
Region foo = server.getCache().getRegion("/FOO");
EvictionAttributes attrs = foo.getAttributes().getEvictionAttributes();
@@ -552,6 +556,6 @@ public class CreateRegionCommandIntegrationTest {
assertThat(attrs.getObjectSizer().getClass().getName())
.isEqualTo(TestObjectSizer.class.getName());
- gfsh.executeAndVerifyCommand("destroy region --name=/FOO");
+ gfsh.executeAndAssertThat("destroy region --name=/FOO").statusIsSuccess();
}
}
diff --git a/geode-core/src/test/java/org/apache/geode/test/junit/rules/GfshShellConnectionRule.java b/geode-core/src/test/java/org/apache/geode/test/junit/rules/GfshShellConnectionRule.java
index ac9a0c9..6f8de9b 100644
--- a/geode-core/src/test/java/org/apache/geode/test/junit/rules/GfshShellConnectionRule.java
+++ b/geode-core/src/test/java/org/apache/geode/test/junit/rules/GfshShellConnectionRule.java
@@ -248,20 +248,6 @@ public class GfshShellConnectionRule extends DescribedExternalResource {
return gfsh.outputString;
}
- @Deprecated
- public void executeAndVerifyCommand(String command, String... expectedOutputs) {
- CommandResult result = null;
- try {
- result = executeCommand(command);
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- assertThat(result.getStatus()).describedAs(getGfshOutput()).isEqualTo(Result.Status.OK);
- for (String expectedOutput : expectedOutputs) {
- assertThat(getGfshOutput()).containsPattern(expectedOutput);
- }
- }
-
public String execute(String command) throws Exception {
executeCommand(command);
--
To stop receiving notification emails like this one, please contact
['"commits@geode.apache.org" <co...@geode.apache.org>'].