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/05/31 13:53:09 UTC
[geode] branch develop updated: GEODE-5266: Add additional tests
for gfsh create region (#2004)
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 2008b46 GEODE-5266: Add additional tests for gfsh create region (#2004)
2008b46 is described below
commit 2008b468eac73b0894449ed3d4fd89e6b4fdfb31
Author: Jens Deppe <jd...@pivotal.io>
AuthorDate: Thu May 31 06:52:33 2018 -0700
GEODE-5266: Add additional tests for gfsh create region (#2004)
---
.../cli/commands/CreateRegionCommandDUnitTest.java | 29 ++++++++++++++++++++++
.../CreateRegionCommandIntegrationTest.java | 9 +++++++
2 files changed, 38 insertions(+)
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateRegionCommandDUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateRegionCommandDUnitTest.java
index af16444..ef9893e 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateRegionCommandDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateRegionCommandDUnitTest.java
@@ -184,6 +184,35 @@ public class CreateRegionCommandDUnitTest {
}
@Test
+ public void cannotSetRegionExpirationForPartitionedTemplate() {
+ gfsh.executeAndAssertThat("create region --name=/TEMPLATE --type=PARTITION")
+ .statusIsSuccess();
+
+ gfsh.executeAndAssertThat(
+ "create region --name=/COPY --template-region=/TEMPLATE --enable-statistics=true --region-idle-time-expiration=1 --region-time-to-live-expiration=1")
+ .statusIsError()
+ .containsOutput(
+ "ExpirationAction INVALIDATE or LOCAL_INVALIDATE for region is not supported for Partitioned Region");
+
+ gfsh.executeAndAssertThat("destroy region --name=/TEMPLATE").statusIsSuccess();
+ }
+
+ @Test
+ public void cannotCreateTemplateWithInconsistentPersistence() {
+ gfsh.executeAndAssertThat("create region --name=/TEMPLATE --type=PARTITION_PERSISTENT")
+ .statusIsSuccess();
+
+ gfsh.executeAndAssertThat(
+ "create region --name=/COPY --template-region=/TEMPLATE --enable-statistics=true --region-idle-time-expiration=1 --region-time-to-live-expiration=1")
+ .statusIsError()
+ .containsOutput(
+ "ExpirationAction INVALIDATE or LOCAL_INVALIDATE for region is not supported for Partitioned Region");
+
+ gfsh.executeAndAssertThat("destroy region --name=/TEMPLATE").statusIsSuccess();
+ }
+
+
+ @Test
public void ensureOverridingCallbacksFromTemplateDoNotRequireClassesOnLocator() throws Exception {
final File prJarFile = new File(tmpDir.getRoot(), "myCacheListener.jar");
new JarBuilder().buildJar(prJarFile, getUniversalClassCode("MyCallback"),
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 e2ccb3a..aa16b16 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
@@ -516,6 +516,15 @@ public class CreateRegionCommandIntegrationTest {
}
@Test
+ public void cannotSetRegionExpirationForPartitionedRegion() {
+ gfsh.executeAndAssertThat(
+ "create region --enable-statistics=true --name=/FOO --type=PARTITION --region-idle-time-expiration=1 --region-time-to-live-expiration=1")
+ .statusIsError()
+ .containsOutput(
+ "ExpirationAction INVALIDATE or LOCAL_INVALIDATE for region is not supported for Partitioned Region");
+ }
+
+ @Test
public void testEvictionAttributesForLRUHeap() throws Exception {
gfsh.executeAndAssertThat(
"create region --name=FOO --type=REPLICATE --eviction-action=local-destroy")
--
To stop receiving notification emails like this one, please contact
jensdeppe@apache.org.