Closed segabriel closed 5 years ago
There are a number of issues with this test so isolating the issue is not so simple. You don't close the services or agents so how do you know a previous one is not around?
Yeap, but I just remove the directory which contains (media-driver, archive, consensus module, and service) before the start (clean start). https://gist.github.com/segabriel/649542396bc982cf2a4d3d2f710b5bbc#file-loggingagentclustertest-java-L62
What if your rerun the test in the same JVM?
I changed my gist with close resources. https://gist.github.com/segabriel/649542396bc982cf2a4d3d2f710b5bbc
I came across a problem. I tried to repeat
io.aeron.agent.LoggingAgentTest
but for listening of cluster events. And I got an exception which breaks cluster:Here is my test https://gist.github.com/segabriel/649542396bc982cf2a4d3d2f710b5bbc So in my test, I enable cluster event codes and launch the agent via:
And then I launch a node in the single cluster mode. And I get the exception above, it happens when the leader elected.
But If I disable
@BeforeClass installAgent()
then everything works.