// }
@Test(expected = IllegalStateException.class)
public void testCannotStartDuplicateDatabase() throws IOException,
InterruptedException, ManifestException {
EmbeddedDerby2 derby = null;
try {
derby = new EmbeddedDerby2(new File(new File(
IConstants.JAVA_IO_TMPDIR_PATH), "temp0"), "test0",
NetUtils.findFreePort(10000, 20000), "test0user",
"test0password");
derby.setup();
derby.startup(10000);
EmbeddedDerby2 derby2 = null;
try {
derby2 = new EmbeddedDerby2(new File(new File(
IConstants.JAVA_IO_TMPDIR_PATH), "temp0"), "test0",
NetUtils.findFreePort(10000, 20000), "test0user",
"test0password");
derby2.setup();
derby2.startup(10000);
} finally {
if (derby2 != null) {
if (derby2.isRunning()) {
derby2.shutdown(10000);
derby2.uninstall();
}
}
}
} finally {
if (derby != null) {