Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CURATOR-594: TestingZooKeeperMain isn't setting tickTime, if configured #383

Merged
merged 1 commit into from May 26, 2021

Conversation

franz1981
Copy link
Contributor

@franz1981 franz1981 commented Apr 20, 2021

@franz1981 franz1981 force-pushed the set_tick_time branch 2 times, most recently from 6892faa to ee38cc6 Compare April 20, 2021 15:19
@franz1981
Copy link
Contributor Author

The test isn't that elegant, but probably need mockito or some other mocking framework to get it tested, I'm opened to change it, if needed.

Comment on lines 43 to 45
final File tmpDir = testingServer.getTempDirectory();
tmpDir.deleteOnExit();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unclear why we need this? Can you add a comment

Copy link
Contributor Author

@franz1981 franz1981 Apr 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not familiar with the server files and if there is a I/O crash con close the files won't be deleted
With junit I would have used temp files provided by the test suite itself, with jupiter I don't know :(

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with jupiter I don't know :(

there is support for temporary files as well
https://www.baeldung.com/junit-5-temporary-directory

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me handle this 👍

@franz1981
Copy link
Contributor Author

@madrob the CI seems to pass with jdk 11, but not with jdk 8, but cannot say why, let me know if there is anything more I can do to help 👍

@eolivelli
Copy link
Contributor

I have restarted the build on jdk8

@franz1981
Copy link
Contributor Author

franz1981 commented Apr 23, 2021

@eolivelli I've had a chat with @Randgalt on https://issues.apache.org/jira/browse/CURATOR-595?focusedCommentId=17330211&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-17330211 that's related (ie this fix was meant to allow me to use the server for my integration tests with curator & ZK), but it seems to fail regularly despite this fix vs the test provided in the issue I've linked above...
There are other missing behaviours/features of the curator testing server that prevent it to use it for the use case I've posted?
It can help me to understand if makes sense to use it, fix it (no idea how) or just use a test container image to get a standalone containerized version of ZK to test the curator semaphore against.

@franz1981
Copy link
Contributor Author

Fixed the tmp directory thanks to @eolivelli comment 👍

Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

@eolivelli
Copy link
Contributor

Let me merge as soon as Travis passes

@michaelpearce-gain
Copy link

@eolivelli any update on merging this? its been a month now....

@eolivelli
Copy link
Contributor

Sorry. I forgot

@eolivelli eolivelli merged commit c26dd85 into apache:master May 26, 2021
@michaelpearce-gain
Copy link

michaelpearce-gain commented May 26, 2021

@eolivelli Thanks , what is roughly the timeline of the next release? Just as we're planning on using this in activemq artemis, but dependent on this fix for us to progress and ultimately ourselves release the feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants