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 TestDisableTableViolationPolicyEnforcement extends BaseViolationPolicyEnforcement {
30
31 private DisableTableViolationPolicyEnforcement enforcement;
32
33 @Before
34 public void setup() {
35 enforcement = new DisableTableViolationPolicyEnforcement();
36 }
37
38 @Test(expected = SpaceLimitingException.class)
39 public void testCheckPut() throws SpaceLimitingException {
40
41
42 enforcement.check(PUT);
43 }
44
45 @Test(expected = SpaceLimitingException.class)
46 public void testCheckAppend() throws SpaceLimitingException {
47 enforcement.check(APPEND);
48 }
49
50 @Test(expected = SpaceLimitingException.class)
51 public void testCheckDelete() throws SpaceLimitingException {
52 enforcement.check(DELETE);
53 }
54
55 @Test(expected = SpaceLimitingException.class)
56 public void testCheckIncrement() throws SpaceLimitingException {
57 enforcement.check(INCREMENT);
58 }
59 }