protected void startStore(File directory) throws Exception { store = createPListStore(); store.setDirectory(directory); store.start(); plist = store.getPList("main"); }
try { tempDataStore.start(); } catch (Exception e) { RuntimeException exception = new RuntimeException(
store = createConcurrentAddRemovePListStore(); store.setDirectory(directory); store.start();
store = createConcurrentAddIterateRemovePListStore(enablePageCache); store.setDirectory(directory); store.start();
store = createConcurrentAddIteratePListStore(); store.setDirectory(directory); store.start();
@Test public void testConcurrentAddLast() throws Exception { File directory = store.getDirectory(); store.stop(); IOHelper.mkdirs(directory); IOHelper.deleteChildren(directory); store = createPListStore(); store.setDirectory(directory); store.start(); final int numThreads = 20; final int iterations = 1000; executor = Executors.newFixedThreadPool(100); for (int i=0; i<numThreads; i++) { new Job(i, PListTestSupport.TaskType.ADD, iterations).run(); } for (int i=0; i<numThreads; i++) { executor.execute(new Job(i, PListTestSupport.TaskType.ITERATE, iterations)); } for (int i=0; i<100; i++) { executor.execute(new Job(i+20, PListTestSupport.TaskType.ADD, 100)); } executor.shutdown(); boolean finishedInTime = executor.awaitTermination(60*5, TimeUnit.SECONDS); assertTrue("finished ok", finishedInTime); }
store = createConcurrentAddRemoveWithPreloadPListStore(); store.setDirectory(directory); store.start();
@Test public void testOverFlow() throws Exception { File directory = store.getDirectory(); store.stop(); IOHelper.mkdirs(directory); IOHelper.deleteChildren(directory); store = createPListStore(); store.setDirectory(directory); store.start(); for (int i=0;i<2000; i++) { new Job(i, PListTestSupport.TaskType.ADD, 5).run(); } // LOG.info("After Load index file: " + store.pageFile.getFile().length()); // LOG.info("After remove index file: " + store.pageFile.getFile().length()); }
try { tempDataStore.start(); } catch (Exception e) { RuntimeException exception = new RuntimeException(
try { tempDataStore.start(); } catch (Exception e) { RuntimeException exception = new RuntimeException(
try { tempDataStore.start(); } catch (Exception e) { RuntimeException exception = new RuntimeException(