public class TestJournalShutdown extends TestCase2
TestCase2.MyProperties, TestCase2.RandomType
_randomType, log
Constructor and Description |
---|
TestJournalShutdown() |
TestJournalShutdown(String name) |
Modifier and Type | Method and Description |
---|---|
void |
setUp() |
void |
tearDown() |
void |
test_memoryLeakWithExplicitClose()
Look for a memory leak when the test calls
AbstractJournal.close()
explicitly. |
void |
test_memoryLeakWithoutExplicitClose()
Look for a memory leak when the test DOES NOT call
AbstractJournal.close() explicitly and instead relies on the JVM to
invoke finalized() on the Journal . |
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEqualsWithinUlps, assertSameArray, assertSameArray, assertSameBigDecimal, assertSameBigDecimal, assertSameBigInteger, assertSameBigInteger, assertSameIterator, assertSameIterator, assertSameIteratorAnyOrder, assertSameIteratorAnyOrder, assertSameValue, assertSameValue, assertZeroUlps, assertZeroUlps, fail, getInnerCause, getNormalInt, getProjectBuildPath, getProperties, getRandomObject, getRandomObject, getRandomOrder, getRandomString, getTestInputStream, getTestResource, getTestResource, getUlps, getUlps, isDEBUG, isDEBUG, isINFO, isINFO, isInnerCause, logProperties
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, toString
public TestJournalShutdown()
public TestJournalShutdown(String name)
name
- public void setUp() throws Exception
setUp
in class junit.framework.TestCase
Exception
public void tearDown() throws Exception
tearDown
in class junit.framework.TestCase
Exception
public void test_memoryLeakWithExplicitClose() throws InterruptedException
AbstractJournal.close()
explicitly.InterruptedException
public void test_memoryLeakWithoutExplicitClose() throws InterruptedException
AbstractJournal.close()
explicitly and instead relies on the JVM to
invoke finalized() on the Journal
.
Note: You SHOULD NOT need to close the Journal. Once it is no longer strongly referenced it SHOULD get finalized(). This MAY be set to [true] to verify that the journal is properly shutting down all of its thread pools, but it MUST be [false] for CI since the whole purpose of this test is to verify that Journals are eventually finalized() if the application no longer holds a strong reference to the journal.
InterruptedException
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.