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

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

pdxcodemonkey commented on a change in pull request #835:
URL: https://github.com/apache/geode-native/pull/835#discussion_r678505200



##########
File path: clicache/integration-test2/GarbageCollectCache.cs
##########
@@ -83,10 +83,9 @@ public void VerifyNoLeakedThreads()
                     // environment startup.
                     if (i > 5)
                     {
-                        //Assert.True(.8 < ratio && ratio < 1.3);
                         string error = "ncThreadsBefore = " + 
ncThreadsBefore.ToString() +
                             ", ncThreadsAfter = " + ncThreadsAfter.ToString();
-                        Assert.False(!(.8 < ratio && ratio < 1.3), error);
+                        Assert.False(!(.5 < ratio && ratio < 2.0), error);

Review comment:
       Can we please make this a positive assert, rather than a negative?  It's 
very hard to read.  The commented-out line that you removed is MUCH clearer, 
while stating the same thing.  
   ```
   Assert.True(.5 < ratio < 2.0);
   ```
   
   Even changing it to two different assertions is easier to read, and 
potentially more helpful for debugging/diagnosis:
   
   ```
   Assert.False(ratio < .5, error);
   Assert.False(ratio > 2.0, error);
   ```
   




-- 
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.

To unsubscribe, e-mail: notifications-unsubscr...@geode.apache.org

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


> Improve Test Stability of VerifyNoLeakedThreads
> -----------------------------------------------
>
>                 Key: GEODE-9472
>                 URL: https://issues.apache.org/jira/browse/GEODE-9472
>             Project: Geode
>          Issue Type: Test
>          Components: native client
>            Reporter: Michael Martell
>            Priority: Major
>              Labels: pull-request-available
>
> This test fails occasionally in the CI due to the heuristic being a little 
> too stringent for such a dynamic environment. Just need to broaden the 
> acceptable range for the ratio process threads before and after a cache 
> operation and cache close.



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

Reply via email to