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