[ 
https://issues.apache.org/jira/browse/GEODE-8769?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17247562#comment-17247562
 ] 

ASF GitHub Bot commented on GEODE-8769:
---------------------------------------

jdeppe-pivotal commented on a change in pull request #5818:
URL: https://github.com/apache/geode/pull/5818#discussion_r540579542



##########
File path: 
geode-redis/src/integrationTest/java/org/apache/geode/redis/internal/RedisStatsIntegrationTest.java
##########
@@ -468,33 +479,33 @@ public void 
NetworkKiloBytesReadOverLastSecond_shouldReturnCorrectData() {
 
   }
 
-
   // ######################### Clients Section 
#################################
 
   @Test
   public void clientsStat_withConnectAndClose_isCorrect() {
 
-    jedis = new Jedis("localhost", server.getPort(), TIMEOUT);
-    jedis.ping();
+    Jedis jedis2 = new Jedis("localhost", server.getPort(), TIMEOUT);
+    jedis2.ping();
 
-    assertThat(redisStats.getConnectedClients()).isEqualTo(1);
+    
assertThat(redisStats.getConnectedClients()).isEqualTo(preTestConnectedClients 
+ 1);
 
-    jedis.close();
+    jedis2.close();
     GeodeAwaitility.await().atMost(Duration.ofSeconds(2))
-        .untilAsserted(() -> 
assertThat(redisStats.getConnectedClients()).isEqualTo(0));
+        .untilAsserted(
+            () -> 
assertThat(redisStats.getConnectedClients()).isEqualTo(preTestConnectedClients));
   }
 
   @Test
   public void 
connectionsReceivedStat_shouldIncrement_WhenNewConnectionOccurs() {
 
-    jedis = new Jedis("localhost", server.getPort(), TIMEOUT);
-    jedis.ping();
+    Jedis jedis2 = new Jedis("localhost", server.getPort(), TIMEOUT);
+    jedis2.ping();
 
-    assertThat(redisStats.getConnectionsReceived()).isEqualTo(1);
+    
assertThat(redisStats.getConnectionsReceived()).isEqualTo(preTestConnectionsReceived
 + 1);
 
-    jedis.close();
+    jedis2.close();
 
-    assertThat(redisStats.getConnectionsReceived()).isEqualTo(1);
+    
assertThat(redisStats.getConnectionsReceived()).isEqualTo(preTestConnectionsReceived
 + 1);

Review comment:
       I don't think this assertion is correct. It should be doing what the 
previous test is doing:
   ```
   GeodeAwaitility.await().atMost(Duration.ofSeconds(2))
           .untilAsserted(() -> 
assertThat(redisStats.getConnectedClients()).isEqualTo(preTestConnectedClients));
   ```




----------------------------------------------------------------
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:
us...@infra.apache.org


> CI Failure: org.apache.geode.redis.internal.RedisStatsIntegrationTest > 
> clientsStat_withConnectAndClose_isCorrect FAILED
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: GEODE-8769
>                 URL: https://issues.apache.org/jira/browse/GEODE-8769
>             Project: Geode
>          Issue Type: Bug
>          Components: redis
>    Affects Versions: 1.14.0
>            Reporter: Raymond Ingles
>            Assignee: Raymond Ingles
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 1.14.0
>
>
> https://concourse.apachegeode-ci.info/teams/main/pipelines/apache-develop-main/jobs/WindowsIntegrationTestOpenJDK8/builds/592
> org.apache.geode.redis.internal.RedisStatsIntegrationTest > 
> clientsStat_withConnectAndClose_isCorrect FAILED
>     org.awaitility.core.ConditionTimeoutException: Assertion condition 
> defined as a lambda expression in 
> org.apache.geode.redis.internal.RedisStatsIntegrationTest expected:<[0]L> but 
> was:<[-2]L> within 2 seconds.
>         at 
> org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:165)
>         at 
> org.awaitility.core.AssertionCondition.await(AssertionCondition.java:119)
>         at 
> org.awaitility.core.AssertionCondition.await(AssertionCondition.java:31)
>         at 
> org.awaitility.core.ConditionFactory.until(ConditionFactory.java:895)
>         at 
> org.awaitility.core.ConditionFactory.untilAsserted(ConditionFactory.java:679)
>         at 
> org.apache.geode.redis.internal.RedisStatsIntegrationTest.clientsStat_withConnectAndClose_isCorrect(RedisStatsIntegrationTest.java:484)
>         Caused by:
>         org.junit.ComparisonFailure: expected:<[0]L> but was:<[-2]L>
>             at sun.reflect.GeneratedConstructorAccessor31.newInstance(Unknown 
> Source)
>             at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>             at 
> org.apache.geode.redis.internal.RedisStatsIntegrationTest.lambda$clientsStat_withConnectAndClose_isCorrect$4(RedisStatsIntegrationTest.java:484)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to