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. -JOrdan From: Cameron McKenzie [email protected] Reply: [email protected] [email protected] Date: June 4, 2014 at 11:39:38 PM To: [email protected] [email protected] Subject: TestingServer Curators, 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. cheers Cam
