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

ASF subversion and git services commented on GEODE-6593:
--------------------------------------------------------

Commit 5e4cca81aa1423e3e6be291de7e1f4e13d0d853e in geode's branch 
refs/heads/develop from Darrel Schneider
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=5e4cca8 ]

GEODE-6593: fix test elapsed time computation (#3401)

The test was using System.currentTimeMillis to verify that
the product has blocked for as long as expected.
But the product is using System.nanoTime.
This can cause race conditions because these two different
clocks can be updated at different times.
The test now also uses System.nanoTime.
Also removed some dead test code.
Added time unit to variable names.
When checking duration ALLOWABLE_ERROR_IN_MILLIS is now used to account for 
non-monotonic system clocks.
Refactored common wait loop into a waitWhile method.


> ConnectionManagerJUnitTest.testBlocking is consistently failing on windows
> --------------------------------------------------------------------------
>
>                 Key: GEODE-6593
>                 URL: https://issues.apache.org/jira/browse/GEODE-6593
>             Project: Geode
>          Issue Type: Bug
>          Components: client/server
>    Affects Versions: 1.10.0
>            Reporter: Dan Smith
>            Assignee: Darrel Schneider
>            Priority: Major
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> This test seems to be failing consistently on windows after the changes for 
> GEODE-6515. Looking at the test, it's doing a lot of Thread.sleep and timing 
> related expectations, so maybe it's just a timing issue?
> {noformat}
> java.lang.AssertionError: Should have blocked for 100 millis for a connection
>       at org.junit.Assert.fail(Assert.java:88)
>       at org.junit.Assert.assertTrue(Assert.java:41)
>       at 
> org.apache.geode.cache.client.internal.pooling.ConnectionManagerJUnitTest.testBlocking(ConnectionManagerJUnitTest.java:678)
> {noformat}
> https://concourse.apachegeode-ci.info/teams/main/pipelines/apache-develop-main/jobs/WindowsIntegrationTestOpenJDK8/builds/399
> http://files.apachegeode-ci.info/builds/apache-develop-main/1.10.0-SNAPSHOT.0128/test-results/integrationTest/1554295015/classes/org.apache.geode.cache.client.internal.pooling.ConnectionManagerJUnitTest.html#testBlocking



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to