1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.hadoop.hbase.quotas.policies;
18
19 import org.apache.hadoop.hbase.quotas.SpaceLimitingException;
20 import org.apache.hadoop.hbase.testclassification.SmallTests;
21 import org.junit.Before;
22 import org.junit.Test;
23 import org.junit.experimental.categories.Category;
24
25
26
27
28 @Category(SmallTests.class)
29 public class TestNoWritesCompactionsViolationPolicyEnforcement
30 extends BaseViolationPolicyEnforcement {
31
32 private NoWritesCompactionsViolationPolicyEnforcement enforcement;
33
34 @Before
35 public void setup() {
36 enforcement = new NoWritesCompactionsViolationPolicyEnforcement();
37 }
38
39 @Test(expected = SpaceLimitingException.class)
40 public void testCheckAppend() throws Exception {
41 enforcement.check(APPEND);
42 }
43
44 @Test(expected = SpaceLimitingException.class)
45 public void testCheckDelete() throws Exception {
46 enforcement.check(DELETE);
47 }
48
49 @Test(expected = SpaceLimitingException.class)
50 public void testCheckIncrement() throws Exception {
51 enforcement.check(INCREMENT);
52 }
53
54 @Test(expected = SpaceLimitingException.class)
55 public void testCheckPut() throws Exception {
56 enforcement.check(PUT);
57 }
58 }