curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cameron McKenzie (JIRA)" <>
Subject [jira] [Commented] (CURATOR-472) Test-only code started to be called in prod
Date Mon, 30 Jul 2018 00:22:00 GMT


Cameron McKenzie commented on CURATOR-472:

This is interesting, as the actual call to close() on the Zookeeper handle (passing in the
time to wait in MS) is not documented as a 'testing only' interface.
* Close this client object as the {@link #close() } method.
* This method will wait for internal resources to be released.
* @param waitForShutdownTimeoutMs timeout (in milliseconds) to wait for resources to be released.
* Use zero or a negative value to skip the wait
* @throws InterruptedException
* @return true if waitForShutdownTimeout is greater than zero and all of the resources have
been released
* @since 3.5.4
public boolean close(int waitForShutdownTimeoutMs) throws InterruptedException {{code}
But, internally, this method calls the testableWaitForShutdown method which is marked as 'for
testing only'.

I also notice that it is stopping tests from completing, but I haven't established why this
is occurring yet.

> Test-only code started to be called in prod
> -------------------------------------------
>                 Key: CURATOR-472
>                 URL:
>             Project: Apache Curator
>          Issue Type: Bug
>          Components: Client
>            Reporter: mskonovalov
>            Assignee: Cameron McKenzie
>            Priority: Critical
> After commit {{fe2c7c4cd606c0cf4bc4fab15deedc0f4c33ea0e}} the method
> {code:java}
> protected boolean testableWaitForShutdown(int wait)
>     throws InterruptedException
> {code}
> with the following comment
> {code:java}
> * Wait up to wait milliseconds for the underlying threads to shutdown.
> {code}
> started to be called from real method {{ZooKeeper.close()}}
> It prevents tests to finish.

This message was sent by Atlassian JIRA

View raw message