Kevin Risden created KNOX-1548:
----------------------------------

             Summary: Improve ZooKeeperConfigurationMonitorTest to not use 
Thread.sleep()
                 Key: KNOX-1548
                 URL: https://issues.apache.org/jira/browse/KNOX-1548
             Project: Apache Knox
          Issue Type: Test
            Reporter: Kevin Risden
            Assignee: Kevin Risden
             Fix For: 1.2.0


Currently ZooKeeperConfigurationMonitorTest uses Thread.sleep(100). This causes 
periodic failures on loaded machines since the condition isn't met after 100ms. 
Instead we should check for a condition and timeout after some time.
{code:java}
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.407 s 
<<< FAILURE! - in 
org.apache.knox.gateway.topology.monitor.ZooKeeperConfigurationMonitorTest
[ERROR] 
testZooKeeperConfigMonitor(org.apache.knox.gateway.topology.monitor.ZooKeeperConfigurationMonitorTest)
  Time elapsed: 0.327 s  <<< FAILURE!
java.lang.AssertionError
        at 
org.apache.knox.gateway.topology.monitor.ZooKeeperConfigurationMonitorTest.testZooKeeperConfigMonitor(ZooKeeperConfigurationMonitorTest.java:202){code}



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

Reply via email to