/** * Testcase to validate {@link DataStore#getAllIdentifiers()} API. */ public void testGetAllIdentifiers() { try { long start = System.currentTimeMillis(); LOG.info("Testcase: " + this.getClass().getName() + "#testGetAllIdentifiers, testDir=" + dataStoreDir); doGetAllIdentifiersTest(); LOG.info("Testcase: " + this.getClass().getName() + "#testGetAllIdentifiers finished, time taken = [" + (System.currentTimeMillis() - start) + "]ms"); } catch (Exception e) { LOG.error("error:", e); fail(e.getMessage()); } }
/** * Testcase to validate mixed scenario use of {@link DataStore}. */ public void testSingleThread() { try { long start = System.currentTimeMillis(); LOG.info("Testcase: " + this.getClass().getName() + "#testSingleThread, testDir=" + dataStoreDir); doTestSingleThread(); LOG.info("Testcase: " + this.getClass().getName() + "#testSingleThread finished, time taken = [" + (System.currentTimeMillis() - start) + "]ms"); } catch (Exception e) { LOG.error("error:", e); fail(e.getMessage()); } }
/** * Testcase to validate {@link DataStore#addRecord(InputStream)} API. */ public void testAddRecord() { try { long start = System.currentTimeMillis(); LOG.info("Testcase: " + this.getClass().getName() + "#addRecord, testDir=" + dataStoreDir); doAddRecordTest(); LOG.info("Testcase: " + this.getClass().getName() + "#addRecord finished, time taken = [" + (System.currentTimeMillis() - start) + "]ms"); } catch (Exception e) { LOG.error("error:", e); fail(e.getMessage()); } }
/** * Testcase to validate {@link DataStore#getRecordFromReference(String)} */ public void testReference() { try { long start = System.currentTimeMillis(); LOG.info("Testcase: " + this.getClass().getName() + "#testReference, testDir=" + dataStoreDir); doReferenceTest(); LOG.info("Testcase: " + this.getClass().getName() + "#testReference finished, time taken = [" + (System.currentTimeMillis() - start) + "]ms"); } catch (Exception e) { LOG.error("error:", e); fail(e.getMessage()); } }
/** * Testcase to validate {@link DataStore#deleteAllOlderThan(long)} API. */ public void testDeleteAllOlderThan() { try { long start = System.currentTimeMillis(); LOG.info("Testcase: " + this.getClass().getName() + "#testDeleteAllOlderThan, testDir=" + dataStoreDir); doDeleteAllOlderThan(); LOG.info("Testcase: " + this.getClass().getName() + "#testDeleteAllOlderThan finished, time taken = [" + (System.currentTimeMillis() - start) + "]ms"); } catch (Exception e) { LOG.error("error:", e); fail(e.getMessage()); } }
/** * Testcase to validate * {@link MultiDataStoreAware#deleteRecord(DataIdentifier)}.API. */ public void testDeleteRecord() { try { long start = System.currentTimeMillis(); LOG.info("Testcase: " + this.getClass().getName() + "#testDeleteRecord, testDir=" + dataStoreDir); doDeleteRecordTest(); LOG.info("Testcase: " + this.getClass().getName() + "#testDeleteRecord finished, time taken = [" + (System.currentTimeMillis() - start) + "]ms"); } catch (Exception e) { LOG.error("error:", e); fail(e.getMessage()); } }
/** * Testcase to validate mixed scenario use of {@link DataStore} in * multi-threaded concurrent environment. */ public void testMultiThreaded() { try { long start = System.currentTimeMillis(); LOG.info("Testcase: " + this.getClass().getName() + "#testMultiThreaded, testDir=" + dataStoreDir); doTestMultiThreaded(); LOG.info("Testcase: " + this.getClass().getName() + "#testMultiThreaded finished, time taken = [" + (System.currentTimeMillis() - start) + "]ms"); } catch (Exception e) { LOG.error("error:", e); fail(e.getMessage()); } }