/** * Test create and shutdown of a named store. * * @throws SailException */ public void test_ctor_2() throws SailException { final File file = new File(getName() + Options.JNL); if (file.exists()) { if (!file.delete()) { fail("Could not delete file before test: " + file); } } final Properties properties = new Properties(); properties.setProperty(Options.FILE, file.toString()); final BigdataSail sail = new BigdataSail(properties); try { sail.initialize(); sail.shutDown(); } finally { if (!file.exists()) { fail("Could not locate store: " + file); if (!file.delete()) { fail("Could not delete file after test: " + file); } } } }
/** * Test create and shutdown of the default store. * * @throws SailException * @throws IOException */ public void test_ctor_1() throws SailException, IOException { final File file = new File(BigdataSail.Options.DEFAULT_FILE); /* * If the default file exists, then delete it before creating the SAIL. */ if (file.exists()) { if (!file.delete()) { throw new IOException("Unable to remove default file:" + file); } } final BigdataSail sail = new BigdataSail(); try { if (!file.exists()) fail("Expected file does not exist: " + file); sail.initialize(); sail.shutDown(); } finally { sail.getIndexManager().destroy(); } }
/** * Test create and shutdown of a named store. * * @throws SailException */ public void test_ctor_2() throws SailException { final File file = new File(getName() + Options.JNL); if (file.exists()) { if (!file.delete()) { fail("Could not delete file before test: " + file); } } final Properties properties = new Properties(); properties.setProperty(Options.FILE, file.toString()); final BigdataSail sail = new BigdataSail(properties); try { sail.initialize(); sail.shutDown(); } finally { if (!file.exists()) { fail("Could not locate store: " + file); if (!file.delete()) { fail("Could not delete file after test: " + file); } } } }
f2.get(250, TimeUnit.MILLISECONDS).close(); } catch (TimeoutException e) { fail("Should have been able to get second connection");
/** * Test create and shutdown of the default store. * * @throws SailException * @throws IOException */ public void test_ctor_1() throws SailException, IOException { final File file = new File(BigdataSail.Options.DEFAULT_FILE); /* * If the default file exists, then delete it before creating the SAIL. */ if (file.exists()) { if (!file.delete()) { throw new IOException("Unable to remove default file:" + file); } } final BigdataSail sail = new BigdataSail(); try { if (!file.exists()) fail("Expected file does not exist: " + file); sail.initialize(); sail.shutDown(); } finally { sail.getIndexManager().destroy(); } }
f2.get(250, TimeUnit.MILLISECONDS).close(); } catch (TimeoutException e) { fail("Should have been able to get second connection");