curator-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jordan Zimmerman <>
Subject Re: TestingServer
Date Thu, 05 Jun 2014 13:00:51 GMT
You can restart the server - it’s just awkward. Curator’s tests do this. To restart the
testing server:

TestingServer server = new TestingServer();


server.stop(); // stop leaves the temp files 

server = new TestingServer(server.getPort(), server.getTempDirectory()); // this is the same
as restarting the server

I’m all for making this a cleaner API.


From: Cameron McKenzie
Date: June 4, 2014 at 11:39:38 PM
Subject:  TestingServer  

Does anyone (Jordan?) know a compelling reason why the TestingServer() starts the underlying
server within the constructor, and has no way of restarting the server?

Not having this functionality makes it useless for testing connection loss and reconnection.
The underlying server classes that TestingServer wraps up, support this functionality.

Unless I'm missing something, I was going to raise a JIRA ticket and write a patch to expose
the start() and restart() methods of the underlying server classes, and also create a new
constructor that doesn't immediately start the underlying servers.
View raw message