public class TestTermIdEncoder extends TestCase2
ICounter
for a TERM2ID index or
index partition.TestCase2.MyProperties, TestCase2.RandomType
_randomType, log
Constructor and Description |
---|
TestTermIdEncoder() |
TestTermIdEncoder(String s) |
Modifier and Type | Method and Description |
---|---|
static void |
main(String[] args)
Performance test.
|
void |
test_ctor_correctRejection()
Ctor correct rejection tests.
|
void |
test_encode_correctRejection()
Unit tests for correct rejection of encoding when the long counter value
contains a partition identifier which is negative or a local counter
value which is negative or zero.
|
void |
test_encode_decode_0bits_pid1_ctr1()
Test of encode/decode when ZERO (0) of the low bits are reversed and
placed into the high bits.
|
void |
test_encode_decode_0bits_stress()
Stress test using an encoder with NO bits reversed and rotated into the
high bits of the long value and random values for the partition
identifier and the local counter.
|
void |
test_encode_decode_1bits_pid0_ctrm1() |
void |
test_encode_decode_1bits_pid0_ctrMAX() |
void |
test_encode_decode_1bits_pid0_ctrMIN() |
void |
test_encode_decode_1bits_pid1_ctr1()
Unit test with ONE (1) for pid and local counter.
|
void |
test_encode_decode_1bits_pidm1_ctr0() |
void |
test_encode_decode_1bits_pidMAX_ctrMAX()
Unit test with
Integer.MAX_VALUE for pid and local counter. |
void |
test_encode_decode_1bits_pidMAX_ctrMIN()
Unit test with
Integer.MAX_VALUE for the pid and
Integer.MIN_VALUE for the local counter. |
void |
test_encode_decode_1bits_pidMIN_ctr0()
Unit test with
Integer.MIN_VALUE for pid and 0L for the local
counter (this combination should not occur in practice since we increment
the local counter before assigning the term identifier rather than after). |
void |
test_encode_decode_1bits_pidMIN_ctrMAX()
Unit test with
Integer.MIN_VALUE for the pid and
Integer.MAX_VALUE for the local counter. |
void |
test_encode_decode_1bits_pidMIN_ctrMIN()
Unit test with
Integer.MIN_VALUE for pid and local counter. |
void |
test_encode_decode_randomBits_stress()
Stress test using an encoder with a random number of bits reversed and
rotated into the high bits of the long value and random values for the
partition identifier and the local counter.
|
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 TestTermIdEncoder()
public TestTermIdEncoder(String s)
public void test_ctor_correctRejection()
public void test_encode_correctRejection()
public void test_encode_decode_0bits_pid1_ctr1()
public void test_encode_decode_0bits_stress()
public void test_encode_decode_1bits_pid1_ctr1()
public void test_encode_decode_1bits_pidMAX_ctrMAX()
Integer.MAX_VALUE
for pid and local counter.public void test_encode_decode_1bits_pidMIN_ctr0()
Integer.MIN_VALUE
for pid and 0L for the local
counter (this combination should not occur in practice since we increment
the local counter before assigning the term identifier rather than after).public void test_encode_decode_1bits_pidm1_ctr0()
public void test_encode_decode_1bits_pid0_ctrm1()
public void test_encode_decode_1bits_pid0_ctrMIN()
public void test_encode_decode_1bits_pid0_ctrMAX()
public void test_encode_decode_1bits_pidMIN_ctrMAX()
Integer.MIN_VALUE
for the pid and
Integer.MAX_VALUE
for the local counter.public void test_encode_decode_1bits_pidMAX_ctrMIN()
Integer.MAX_VALUE
for the pid and
Integer.MIN_VALUE
for the local counter.public void test_encode_decode_1bits_pidMIN_ctrMIN()
Integer.MIN_VALUE
for pid and local counter.public void test_encode_decode_randomBits_stress()
public static void main(String[] args)
args
- Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.