Class TestRegionNormalizerWorkQueue
java.lang.Object
org.apache.hadoop.hbase.master.normalizer.TestRegionNormalizerWorkQueue
Tests that
RegionNormalizerWorkQueue
implements the contract described in its docstring.-
Nested Class Summary
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static <E> void
drainTo
(org.apache.hadoop.hbase.master.normalizer.RegionNormalizerWorkQueue<E> queue, Collection<E> dest) void
Test that the uniqueness constraint is honored in the face of concurrent modification.void
void
void
testTake()
Test that calls toRegionNormalizerWorkQueue.take()
block the requesting thread.
-
Field Details
-
CLASS_RULE
-
testName
-
-
Constructor Details
-
TestRegionNormalizerWorkQueue
public TestRegionNormalizerWorkQueue()
-
-
Method Details
-
testElementUniquenessAndFIFO
- Throws:
Exception
-
testPriorityAndFIFO
- Throws:
Exception
-
testConcurrentPut
Test that the uniqueness constraint is honored in the face of concurrent modification.- Throws:
Exception
-
testTake
Test that calls toRegionNormalizerWorkQueue.take()
block the requesting thread. The producing thread places new entries onto the queue following a known schedule. The consuming thread collects a time measurement between calls totake
. Finally, the test makes coarse-grained assertions of the consumer's observations based on the producer's schedule.- Throws:
Exception
-
drainTo
private static <E> void drainTo(org.apache.hadoop.hbase.master.normalizer.RegionNormalizerWorkQueue<E> queue, Collection<E> dest) throws InterruptedException - Throws:
InterruptedException
-