1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.apache.hadoop.hbase.master;
21 import static org.junit.Assert.*;
22
23 import java.util.concurrent.atomic.AtomicBoolean;
24
25 import org.apache.hadoop.conf.Configuration;
26 import org.apache.hadoop.hbase.HBaseConfiguration;
27 import org.apache.hadoop.hbase.master.RegionServerOperationQueue.ProcessingResultCode;
28 import org.junit.After;
29 import org.junit.Before;
30 import org.junit.Test;
31
32
33
34
35
36
37 public class TestRegionServerOperationQueue {
38 private RegionServerOperationQueue queue;
39 private Configuration conf;
40 private AtomicBoolean closed;
41
42 @Before
43 public void setUp() throws Exception {
44 this.closed = new AtomicBoolean(false);
45 this.conf = new Configuration();
46 this.queue = new RegionServerOperationQueue(this.conf, this.closed);
47 }
48
49 @After
50 public void tearDown() throws Exception {
51 }
52
53 @Test
54 public void testWeDoNotGetStuckInDelayQueue() throws Exception {
55 ProcessingResultCode code = this.queue.process();
56 assertTrue(ProcessingResultCode.NOOP == code);
57 }
58 }