[ https://issues.apache.org/jira/browse/OAK-4737?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15470658#comment-15470658 ]
Timothee Maret commented on OAK-4737: ------------------------------------- This test class is disabled in the TarMk. Trying to enable it for Segment tar, I think the test themselves are bogus in the following way 1. The client tests wrongly assume that the number of {{FailedRequests}} and {{calcFailedRequests}} is 1 where it should be {{0}}. Indeed, the only way to have {{1}} is to actually run a request via the {{StandbyClient#run}} method which is never invoked in the test. 2. The client test wrongly assume that the status is {{initializing}} where it should be {{running}} according to the code. 3. The server test ({{testServerEmptyConfig}}) depends on async behaviour which makes it fail from time to time. Indeed the server status in the {{StandbyServer#start(boolean)}} method is set by an async mechanism and the test contain assertions related to the status. For 3., one may expect that changing the test such that it invokes {{StandbyServer#startAndWait}} instead of {{StandbyServer#start}} would solve the race issue. However, the implementation of {{StandbyServer#startAndWait}} does not behaves like that, indeed the {{close}} thread is started as a thread in [0] and there's no mechanism to enforce waiting on it to complete. [~alex.parvulescu], [~frm] wdyt ? Should we fix the test or keep them disabled it in Segment tar ? For 3. is my assumption correct that {{StandbyServer#startAndWait}} should block until the {{close}} runnable is done ? [0] https://github.com/apache/jackrabbit-oak/blob/99edb3fddf80064a27d64477a590b96b491e9a95/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/standby/server/StandbyServer.java#L184 > Fix unit tests in MBeanTest > --------------------------- > > Key: OAK-4737 > URL: https://issues.apache.org/jira/browse/OAK-4737 > Project: Jackrabbit Oak > Issue Type: Technical task > Components: segment-tar > Reporter: Andrei Dulceanu > Assignee: Timothee Maret > Fix For: Segment Tar 0.0.20 > > -- This message was sent by Atlassian JIRA (v6.3.4#6332)