public abstract class AbstractBindingSetEncoderTestCase extends TestCase2
IBindingSetEncoder
and IBindingSetDecoder
test
suites.TestCase2.MyProperties, TestCase2.RandomType
_randomType, log
Constructor and Description |
---|
AbstractBindingSetEncoderTestCase() |
AbstractBindingSetEncoderTestCase(String name) |
Modifier and Type | Method and Description |
---|---|
protected void |
assertEquals(IBindingSet expected,
IBindingSet actual,
boolean testCache) |
protected IBindingSet |
doEncodeDecodeTest(IBindingSet expected) |
protected IBindingSet |
doEncodeDecodeTest(IBindingSet expected,
boolean testCache) |
protected BlobIV<BigdataLiteral> |
getVeryLargeLiteral() |
protected void |
setUp() |
protected void |
tearDown() |
void |
test_encodeEmpty() |
void |
test_encodeNonEmpty() |
void |
test_encodeNonEmpty2() |
void |
test_encodeNonEmptyWithCachedValue() |
void |
test_encodeNonEmptyWithCachedValues() |
void |
test_encodeNonEmptyWithCachedValuesAndInlineValues()
|
void |
test_encodeNonEmptyWithCachedValuesAndInlineValues2()
|
void |
test_multipleSolutions()
Multiple solutions where a variable does not appear in the 2nd solution.
|
void |
test_multipleSolutions2()
Multiple solutions where a new variables appears in the 2nd solution.
|
void |
test_multipleSolutions3()
Multiple solutions where an empty solution appears in the middle of the
sequence.
|
void |
test_multipleSolutions4()
Multiple solutions where an empty solution appears in the 1st solution.
|
void |
test_multipleSolutions5()
Multiple solutions where an empty solution appears in the last solution.
|
void |
test_multipleSolutionsWithCachedValue4()
Multiple solutions where an empty solution appears in the 1st solution.
|
void |
test_multipleSolutionsWithCachedValue5()
Multiple solutions where an empty solution appears in the last solution.
|
void |
test_multipleSolutionsWithCachedValues()
Multiple solutions where a variable does not appear in the 2nd solution.
|
void |
test_multipleSolutionsWithCachedValues2()
Multiple solutions where a new variables appears in the 2nd solution.
|
void |
test_multipleSolutionsWithCachedValues3()
Multiple solutions where an empty solution appears in the middle of the
sequence.
|
void |
test_solutionWithAllMockIVs()
Unit test with all mock IVs.
|
void |
test_solutionWithMockIVAndOthersToo()
Unit test with all mix of MockIVs, TermIds, and BlobIVs.
|
void |
test_solutionWithMockIVsPreservesFlagsBits()
This issue showed up as part of BLZG-533 (vector query engine on native
heap) where the flags bits (which indicate URI or BNode or Literal) were
not being preserved for a MockIV.
|
void |
test_solutionWithOneMockIV()
Unit test with one mock IV.
|
void |
test_solutionWithSameValueBoundTwice() |
void |
test_solutionWithThreeBindings1()
Unit test of a solution with 3 bindings.
|
void |
test_solutionWithThreeBindings2()
Unit test of a solution with 3 bindings in a different order.
|
void |
test_solutionWithThreeBindingsSomeNotCached1()
Unit test of a solution with 3 bindings, some of which do not have an
IVCache association. |
void |
test_solutionWithThreeBindingsSomeNotCachedSomeInline()
Unit test of a solution with 3 bindings, some of which do not have an
IVCache association and some of which have an inline IV. |
void |
test_solutionWithVeryLargeObject()
Unit test of a solution having a
BlobIV with a
BigdataLiteral which is very large. |
void |
test_solutionWithVeryLargeObject2()
Unit test of a solution having a
BlobIV with a
BigdataLiteral which is very large plus a few other bindings. |
void |
test_solutionWithVeryLargeObject3()
Unit test of a solution having a
BlobIV with a
BigdataLiteral which is very large plus a few other bindings
(different order from the test above). |
void |
testAbstractLiteralIVs() |
void |
testFullyInlineUriIV() |
void |
testLiteralExtensionIV() |
void |
testUriExtensionIV() |
void |
testVocabUriByteIV() |
void |
testVocabUriShortIV() |
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
protected boolean testCache
true
, doEncodeDecodeTest(IBindingSet)
will
also verify that the IVCache
assertions were decoded.protected String namespace
BigdataValueFactory
.protected BigdataValueFactory valueFactory
protected TermId<BigdataLiteral> termId
protected TermId<BigdataLiteral> termId2
protected BlobIV<BigdataLiteral> blobIV
protected TermId<BigdataValue> mockIV1
protected TermId<BigdataValue> mockIV2
protected TermId<BigdataValue> mockIV3
protected TermId<BigdataValue> mockIVCarryingUri
protected TermId<BigdataValue> mockIVCarryingBNode
protected XSDIntegerIV<BigdataLiteral> inlineIV1
IVCache
is set.protected XSDDecimalIV<BigdataLiteral> inlineIV2
IVCache
is set.protected XSDNumericIV<BigdataLiteral> inlineIV3
IVCache
is set.protected XSDBooleanIV<?> inlineIV4
IVCache
is NOT set.protected FullyInlineTypedLiteralIV<BigdataLiteral> fullyInlinedTypedLiteralIV
protected IPv4AddrIV<BigdataLiteral> ipV4AddrIv
protected LiteralArrayIV literalArrayIV
protected PackedLongIV<BigdataLiteral> packedLongIV
protected UUIDLiteralIV<BigdataLiteral> uuidLiteralIV
protected XSDUnsignedByteIV<BigdataLiteral> unsignedByteIV
protected XSDUnsignedIntIV<BigdataLiteral> unsignedIntIV
protected XSDUnsignedLongIV<BigdataLiteral> unsignedLongIV
protected XSDUnsignedShortIV<BigdataLiteral> unsignedShortIV
protected FullyInlineURIIV<BigdataURI> fullyInlineUriIV
protected LiteralExtensionIV<BigdataLiteral> literalExtensionIV
protected URIExtensionIV<?> uriExtensionIV
protected VocabURIByteIV<BigdataURI> vocabUriByteIV
protected VocabURIShortIV<BigdataURI> vocabUriShortIV
protected IBindingSetEncoder encoder
protected IBindingSetDecoder decoder
public AbstractBindingSetEncoderTestCase()
public AbstractBindingSetEncoderTestCase(String name)
name
- protected void setUp() throws Exception
setUp
in class junit.framework.TestCase
Exception
protected void tearDown() throws Exception
tearDown
in class junit.framework.TestCase
Exception
protected IBindingSet doEncodeDecodeTest(IBindingSet expected)
protected IBindingSet doEncodeDecodeTest(IBindingSet expected, boolean testCache)
expected
- testCache
- protected void assertEquals(IBindingSet expected, IBindingSet actual, boolean testCache)
public void test_encodeEmpty()
public void test_encodeNonEmpty()
public void test_encodeNonEmpty2()
public void test_multipleSolutions()
public void test_multipleSolutions2()
public void test_multipleSolutions3()
public void test_multipleSolutions4()
public void test_multipleSolutions5()
public void test_encodeNonEmptyWithCachedValue()
public void test_encodeNonEmptyWithCachedValues()
public void test_encodeNonEmptyWithCachedValuesAndInlineValues()
public void test_encodeNonEmptyWithCachedValuesAndInlineValues2()
public void test_multipleSolutionsWithCachedValues()
public void test_multipleSolutionsWithCachedValues2()
public void test_multipleSolutionsWithCachedValues3()
public void test_multipleSolutionsWithCachedValue4()
public void test_multipleSolutionsWithCachedValue5()
public void test_solutionWithThreeBindings1()
public void test_solutionWithThreeBindingsSomeNotCached1()
public void test_solutionWithThreeBindingsSomeNotCachedSomeInline()
IVCache
association and some of which have an inline IV. This
test was added when it was observed that we were pushing inline IVs into
the cache for the IVBindingSetEncoderWithIVCache
.public void test_solutionWithThreeBindings2()
public void testAbstractLiteralIVs()
public void testFullyInlineUriIV()
public void testLiteralExtensionIV()
public void testUriExtensionIV()
public void testVocabUriByteIV()
public void testVocabUriShortIV()
protected BlobIV<BigdataLiteral> getVeryLargeLiteral()
public void test_solutionWithVeryLargeObject()
BlobIV
with a
BigdataLiteral
which is very large.public void test_solutionWithVeryLargeObject2()
BlobIV
with a
BigdataLiteral
which is very large plus a few other bindings.public void test_solutionWithVeryLargeObject3()
BlobIV
with a
BigdataLiteral
which is very large plus a few other bindings
(different order from the test above).public void test_solutionWithSameValueBoundTwice()
public void test_solutionWithOneMockIV()
Note: TermId.mockIV(VTE)
is used to generate "mock" IV
s
by operators which produce values (such as SUBSTR()) that are not in the
database. The termId for all "mock" IV
is 0L
. While
TermId.equals(Object)
takes the IVCache
association into
account, the association is not yet available when we are de-serializing
an encoded solution and is not part of the key when the key is
constructed using IVUtility.encode(IKeyBuilder, IV)
. In each case
this can lead to incorrectly resolving two "mock" IV
s to the same
value in an internal case.
public void test_solutionWithAllMockIVs()
public void test_solutionWithMockIVAndOthersToo()
public void test_solutionWithMockIVsPreservesFlagsBits()
SolutionSetStream incorrectly decodes VTE of MockIVs
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.