1 package com.powerset.heritrix.writer.test;
2
3 import org.testng.Assert;
4 import org.testng.annotations.BeforeClass;
5 import org.testng.annotations.Test;
6
7 import com.powerset.heritrix.writer.HBaseWriterPool;
8
9
10
11
12
13 public class TestHBaseWriterPool {
14
15
16 String master = "locahost";
17
18
19 String table = "test";
20
21
22 int poolMaximumActive = 10;
23
24
25 int poolMaximumWait = 20;
26
27
28 HBaseWriterPool hwp;
29
30
31
32
33 @BeforeClass()
34 public void createHBaseWriterPool() {
35 hwp = new HBaseWriterPool(master, table, poolMaximumActive,
36 poolMaximumWait);
37 }
38
39
40
41
42 @Test()
43 public void testHBaseWriterPoolIntegrity() {
44 Assert.assertNotNull(hwp);
45 Assert.assertEquals(hwp.getNumActive(), 0);
46 Assert.assertEquals(hwp.getNumIdle(), 0);
47 Assert.assertEquals(hwp.getSerialNo().intValue(), 0);
48 Assert.assertFalse(hwp.getSettings().isCompressed());
49 Assert.assertNull(hwp.getSettings().getPrefix());
50 Assert.assertNull(hwp.getSettings().getSuffix());
51 }
52 }