public abstract class AbstractIndexManagerTestCase<S extends IIndexManager> extends TestCase3
TestCase2.MyProperties, TestCase2.RandomType
_randomType, log
Constructor and Description |
---|
AbstractIndexManagerTestCase() |
AbstractIndexManagerTestCase(String name) |
Modifier and Type | Method and Description |
---|---|
protected void |
checkIfProxy()
This method is invoked from methods that MUST be proxied to this class.
|
protected void |
fail(Callable<?> c,
Class<? extends Throwable> expected)
Test helper evaluates a
Callable and fails unless the expected
exception is thrown. |
Properties |
getProperties()
Reads in the configuration properties for the test from a
variety of resources and returns a properties hierarchy.
|
ByteBuffer |
getRandomData()
Returns random data that will fit in N bytes.
|
protected abstract S |
getStore(Properties properties)
Open/create an
IIndexManager using the given properties. |
protected abstract S |
reopenStore(S store)
Close and then re-open an
IIndexManager backed by the same
persistent data. |
void |
setUp() |
void |
setUp(ProxyTestCase<S> testCase)
Invoked from
TestCase.setUp() for each test in the suite. |
void |
tearDown() |
void |
tearDown(ProxyTestCase<S> testCase)
Invoked from
TestCase.tearDown() for each test in the suite. |
assertCondition, assertCondition, assertEquals, assertEquals, getBytes, getPort, getRandomData, getRandomData
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, 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 AbstractIndexManagerTestCase()
public AbstractIndexManagerTestCase(String name)
public void setUp(ProxyTestCase<S> testCase) throws Exception
TestCase.setUp()
for each test in the suite.Exception
public void tearDown(ProxyTestCase<S> testCase) throws Exception
TestCase.tearDown()
for each test in the suite.Exception
public void tearDown() throws Exception
public Properties getProperties()
TestCase2
Properties
object, then the lower levels of the
hierarchy are recursively searched.The hierarchy is constructed from the following properties files in the following order. The first property file in this list corresponds to the top of the property hierarchy. The last property file in this list corresponds to the bottom of the property hierarchy. The property resources are:
getProperties
in class TestCase2
Properties
object that supplies bindings for
property names according to the described hierarchy among
property resources. The returned Properties
is NOT
cached.
TODO This does not handle the recursive truncation of the
class name to search for "test.properties" yet.protected abstract S getStore(Properties properties)
IIndexManager
using the given properties.protected abstract S reopenStore(S store)
IIndexManager
backed by the same
persistent data.store
- the existing store.Throwable
- if the existing store is closed or if the store can not be
re-opened, e.g., from failure to obtain a file lock, etc.protected final void checkIfProxy()
GenericProxyTestCase
extends this class, as do the concrete
classes that drive the test suite for specific GOM integration test
configuration. Many methods on this class must be proxied from
GenericProxyTestCase
to the delegate. Invoking this method from
the implementations of those methods in this class provides a means of
catching omissions where the corresponding method is NOT being delegated.
Failure to delegate these methods means that you are not able to share
properties or object manager instances across tests, which means that you
can not do configuration-based testing of integrations and can also wind
up with mutually inconsistent test fixtures between the delegate and each
proxy test.public ByteBuffer getRandomData()
ByteBuffer
wrapping a new byte[]
of
random length and having random contents.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.