@Test public void testReinitialize() throws InterruptedException { AbstractTest test = new MockTest(); runMap.addTest(test); for (int i = 0; i < 100; i++) { runMap.record(createTestResult(test, TestResult.Status.PASSED)); } Assert.assertEquals(100, runMap.getCurrentTestResults().size()); Assert.assertEquals(100, runMap.getRecord(test).getTotalRuns()); runMap.reinitialize(); Assert.assertEquals(0, runMap.getCurrentTestResults().size()); Assert.assertEquals(0, runMap.getRecord(test).getTotalRuns()); }
public void reinitialize() { runMapLock.writeLock().lock(); try { for (TestEntry testEntry : runMap.values()) { testEntry.init(); testEntry.reinitTime(); } clearCurrentTestResults(); } finally { runMapLock.writeLock().unlock(); } }
RunMapImpl implements RunMap { public void reinitialize() { runMapLock.writeLock().lock(); try { for (TestEntry testEntry : runMap.values()) { testEntry.init(); testEntry.reinitTime(); } clearCurrentTestResults(); } finally { runMapLock.writeLock().unlock(); } } }
RunMapImpl implements RunMap { public void reinitialize() { runMapLock.writeLock().lock(); try { for (TestEntry testEntry : runMap.values()) { testEntry.init(); testEntry.reinitTime(); } clearCurrentTestResults(); } finally { runMapLock.writeLock().unlock(); } } RunMapImpl(); private  RunMapImpl(List<AbstractTest> orderedTests); }
RunMapImpl implements RunMap { public void reinitialize() { runMapLock.writeLock().lock(); try { for (TestEntry testEntry : runMap.values()) { testEntry.init(); testEntry.reinitTime(); } clearCurrentTestResults(); } finally { runMapLock.writeLock().unlock(); } } RunMapImpl(); private  RunMapImpl(List<AbstractTest> orderedTests); void addTest(AbstractTest test); TestStatistics getRecord(AbstractTest test); Collection<TestResult> getCurrentTestResults(); Collection<AbstractTest> getTests(); void record(TestResult testResult); Map<AbstractTest, Long> aggregateAndReinitialize(RunMap otherRunmap); void reinitialize(); void reinitStartTimes(); void clearCurrentTestResults(); RunMap newInstance(); }
RunMapImpl implements RunMap { public void reinitialize() { runMapLock.writeLock().lock(); try { for (TestEntry testEntry : runMap.values()) { testEntry.init(); testEntry.reinitTime(); } clearCurrentTestResults(); } finally { runMapLock.writeLock().unlock(); } } RunMapImpl(); private  RunMapImpl(List<AbstractTest> orderedTests); void addTest(AbstractTest test); TestStatistics getRecord(AbstractTest test); Collection<TestResult> getCurrentTestResults(); Collection<AbstractTest> getTests(); void record(TestResult testResult); Map<AbstractTest, Long> aggregateAndReinitialize(RunMap otherRunmap); void reinitialize(); void reinitStartTimes(); void clearCurrentTestResults(); RunMap newInstance();  }