You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by "Kevin Risden (JIRA)" <ji...@apache.org> on 2018/11/01 19:50:00 UTC

[jira] [Updated] (KNOX-1548) Improve ZooKeeperConfigurationMonitorTest to not use Thread.sleep()

     [ https://issues.apache.org/jira/browse/KNOX-1548?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Risden updated KNOX-1548:
-------------------------------
    Attachment: KNOX-1548.patch
        Status: Patch Available  (was: In Progress)

> 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
>            Priority: Minor
>             Fix For: 1.2.0
>
>         Attachments: KNOX-1548.patch
>
>
> 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)