You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2020/11/20 18:11:53 UTC

[GitHub] [geode] ringles commented on a change in pull request #5767: GEODE-8717: INFO command returns specified sections

ringles commented on a change in pull request #5767:
URL: https://github.com/apache/geode/pull/5767#discussion_r527885873



##########
File path: geode-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/server/AbstractInfoIntegrationTest.java
##########
@@ -98,71 +165,115 @@ public void shouldReturnClusterEnabledProperty() {
     assertThat(actualResult).contains(expectedResult);
   }
 
-  final List<String> SERVER_PROPERTIES =
-      Arrays.asList(
-          "# Server",
-          "redis_version:",
-          "tcp_port:",
-          "redis_mode:");
-
-  final List<String> PERSISTENCE_PROPERTIES =
-      Arrays.asList(
-          "# Persistence",
-          "loading:");
-
-  final List<String> CLUSTER_PROPERTIES =
-      Arrays.asList(
-          "# Cluster",
-          "cluster_enabled:");
-
   @Test
-  public void shouldReturnServerSectionsGivenServerSectionParameter() {
+  public void shouldReturnServerSections_givenServerSectionParameter() {
+    List<String> nonServerProperties = ALL_PROPERTIES;
+    nonServerProperties.removeAll(SERVER_PROPERTIES);
+
     String actualResult = jedis.info("server");
 
     assertThat(actualResult).contains(SERVER_PROPERTIES);
-    assertThat(actualResult).doesNotContain(CLUSTER_PROPERTIES);
-    assertThat(actualResult).doesNotContain(PERSISTENCE_PROPERTIES);
+    assertThat(actualResult).doesNotContain(nonServerProperties);
   }
 
   @Test
-  public void shouldReturnClusterSectionsGivenClusterSectionParameter() {
+  public void shouldReturnClusterSections_givenClusterSectionParameter() {
+    List<String> nonClusterProperties = ALL_PROPERTIES;
+    nonClusterProperties.removeAll(CLUSTER_PROPERTIES);
+
     String actualResult = jedis.info("cluster");
 
     assertThat(actualResult).contains(CLUSTER_PROPERTIES);
-    assertThat(actualResult).doesNotContain(SERVER_PROPERTIES);
-    assertThat(actualResult).doesNotContain(PERSISTENCE_PROPERTIES);
+    assertThat(actualResult).doesNotContain(nonClusterProperties);
   }
 
   @Test
-  public void shouldReturnPersistenceSectionsGivenPersistenceSectionParameter() {
+  public void shouldReturnPersistenceSections_givenPersistenceSectionParameter() {
+    List<String> nonPersistenceProperties = ALL_PROPERTIES;
+    nonPersistenceProperties.removeAll(PERSISTENCE_PROPERTIES);
+
     String actualResult = jedis.info("persistence");
 
     assertThat(actualResult).contains(PERSISTENCE_PROPERTIES);
-    assertThat(actualResult).doesNotContain(SERVER_PROPERTIES);
-    assertThat(actualResult).doesNotContain(CLUSTER_PROPERTIES);
+    assertThat(actualResult).doesNotContain(nonPersistenceProperties);
+  }
+
+  @Test
+  public void shouldReturnStatsSections_givenStatsSectionParameter() {
+    List<String> nonStatsProperties = ALL_PROPERTIES;
+    nonStatsProperties.removeAll(STATS_PROPERTIES);

Review comment:
       Done!




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org