Unit testing
Nov 2, 2010
I tried to write a unit test (TestNG) which dynamically starts an instance of VoltDB. But if VoltDB fails to start for any reason it calls System.exit(-1) (noticed this in ServerThread constructors) and this then kills the unit test and does not signal failure. If it threw an exception instead of System.exit() this problem would be solved or is there a different way to start up Volt for unit tests?
I was using the following code in the setup() method of my unit tests.
Server server = new ServerThread(config);
server.start();
server.waitForInitialization();
I was using the following code in the setup() method of my unit tests.
Server server = new ServerThread(config);
server.start();
server.waitForInitialization();