public class TestRegionNormalizerWorkQueue extends Object
RegionNormalizerWorkQueue
implements the contract described in its docstring.Modifier and Type | Class and Description |
---|---|
private static class |
TestRegionNormalizerWorkQueue.Action |
Modifier and Type | Field and Description |
---|---|
static HBaseClassTestRule |
CLASS_RULE |
org.junit.rules.TestName |
testName |
Constructor and Description |
---|
TestRegionNormalizerWorkQueue() |
Modifier and Type | Method and Description |
---|---|
private static <E> void |
drainTo(org.apache.hadoop.hbase.master.normalizer.RegionNormalizerWorkQueue<E> queue,
Collection<E> dest) |
void |
testConcurrentPut()
Test that the uniqueness constraint is honored in the face of concurrent modification.
|
void |
testElementUniquenessAndFIFO() |
void |
testPriorityAndFIFO() |
void |
testTake()
Test that calls to
RegionNormalizerWorkQueue.take() block the requesting thread. |
public static final HBaseClassTestRule CLASS_RULE
public org.junit.rules.TestName testName
public TestRegionNormalizerWorkQueue()
public void testElementUniquenessAndFIFO() throws Exception
Exception
public void testPriorityAndFIFO() throws Exception
Exception
public void testConcurrentPut() throws Exception
Exception
public void testTake() throws Exception
RegionNormalizerWorkQueue.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 to take
. Finally, the test makes
coarse-grained assertions of the consumer's observations based on the producer's schedule.Exception
private static <E> void drainTo(org.apache.hadoop.hbase.master.normalizer.RegionNormalizerWorkQueue<E> queue, Collection<E> dest) throws InterruptedException
InterruptedException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.