public class TestRunState extends TestCase2
RunState
.TestCase2.MyProperties, TestCase2.RandomType
_randomType, log
Constructor and Description |
---|
TestRunState() |
TestRunState(String name) |
Modifier and Type | Method and Description |
---|---|
protected ThickAsynchronousIterator<IBindingSet[]> |
newBindingSetIterator(IBindingSet bindingSet)
Return an
IAsynchronousIterator that will read a single,
empty IBindingSet . |
protected Map<Integer,AtomicLong> |
newMap(int[] ids,
long[] vals)
Turn two correlated arrays into a
Map . |
protected Map<Integer,Set> |
newMap(int[] ids,
Object[][] vals)
|
protected <T> Map<Integer,T> |
newMap(int[] ids,
T[] vals)
Turn two correlated arrays into a
Map . |
protected Set<Integer> |
newSet(int[] a)
Turn an array into a
Set . |
protected <T> Set<T> |
newSet(T[] a)
Turn an array into a
Set . |
void |
test_ctor_correctRejection()
Unit test for the constructor (correct rejection).
|
void |
test_ctor()
Unit test for the constructor (correct acceptance).
|
void |
test_deadline_haltOp()
Unit test for correct interpretation of a deadline.
|
void |
test_deadline_startOp()
Unit test for correct interpretation of a deadline.
|
void |
test_deadline_startQ()
Unit test for correct interpretation of a deadline.
|
void |
test_getOperatorRunState_atOnceRequested()
Unit test for
RunState.getOperatorRunState(int) when some
operators require at-once evaluation. |
void |
test_getOperatorRunState_lastPassRequested()
Unit test for
RunState.getOperatorRunState(int) when some
operators specify the PipelineOp.Annotations#LAST_PASS
annotation. |
void |
test_getOperatorRunState()
Unit test for
RunState.getOperatorRunState(int) |
void |
test_lastPassRequested()
Unit tests for an operator which requests a final evaluation pass.
|
void |
test_runSingleOperatorQuery()
Very simple unit test for the
RunState API. |
void |
test_runTwoOperatorQuery()
Run a two operator query where the first operator produces a single
output message and the second operator consumes that message.
|
void |
test_startQueryTwice()
Unit test verifies that attempting to start a query twice is an error.
|
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, setUp, tearDown, toString
public TestRunState()
public TestRunState(String name)
name
- protected ThickAsynchronousIterator<IBindingSet[]> newBindingSetIterator(IBindingSet bindingSet)
IAsynchronousIterator
that will read a single,
empty IBindingSet
.bindingSet
- the binding set.protected Set<Integer> newSet(int[] a)
Set
.a
- The array.Set
.protected <T> Set<T> newSet(T[] a)
Set
.a
- The array.Set
.protected Map<Integer,AtomicLong> newMap(int[] ids, long[] vals)
Map
.ids
- The keys.vals
- The values.Map
.protected <T> Map<Integer,T> newMap(int[] ids, T[] vals)
Map
.ids
- The keys.vals
- The values.Map
.protected Map<Integer,Set> newMap(int[] ids, Object[][] vals)
Map
associating Integer
keys with Set
s. The 2nd array is two dimension and specifies the
set of values for each entry in the Map
.ids
- The keys.vals
- The values.Map
.public void test_ctor()
public void test_ctor_correctRejection()
public void test_getOperatorRunState()
RunState.getOperatorRunState(int)
public void test_getOperatorRunState_lastPassRequested()
RunState.getOperatorRunState(int)
when some
operators specify the PipelineOp.Annotations#LAST_PASS
annotation.
TODO Do another variant where there are two such operators. For this
variant, we want to make sure that the last pass evaluation for each
operator is executed properly.public void test_getOperatorRunState_atOnceRequested()
RunState.getOperatorRunState(int)
when some
operators require at-once evaluation.public void test_runSingleOperatorQuery() throws TimeoutException, ExecutionException
RunState
API. A query with a single
StartOp
operator is created and the RunState
for that
query is directly manipulated in accordance with a simple evaluation
schedule for the query (startQuery, startOp, haltOp, allDone). The
post-condition of the RunState
object is verified after each
action.public void test_runTwoOperatorQuery() throws TimeoutException, ExecutionException
TimeoutException
ExecutionException
public void test_startQueryTwice() throws TimeoutException, ExecutionException
TimeoutException
ExecutionException
public void test_deadline_startQ() throws TimeoutException, ExecutionException, InterruptedException
RunState.startQuery(IChunkMessage)
.public void test_deadline_startOp() throws TimeoutException, ExecutionException, InterruptedException
RunState.startOp(IStartOpMessage)
.public void test_deadline_haltOp() throws TimeoutException, ExecutionException, InterruptedException
RunState.haltOp(IHaltOpMessage)
.public void test_lastPassRequested() throws TimeoutException, ExecutionException, InterruptedException
TimeoutException
ExecutionException
InterruptedException
PipelineOp.Annotations#LAST_PASS
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.