Skip to content

Commit 7c93c10

Browse files
author
Steve Powell
committed
Fix WorkPoolTests un javaDoc fixes
1 parent 2eaa1d4 commit 7c93c10

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

test/src/com/rabbitmq/client/impl/WorkPoolTests.java

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,25 @@
66
import java.util.List;
77

88
/**
9+
* Unit tests for {@link WorkPool}
910
*/
1011
public class WorkPoolTests extends TestCase {
1112

1213
private WorkPool<String, Object> pool = new WorkPool<String, Object>();
1314

14-
public void testUnknownKey() {
15+
/**
16+
* Test unknown key tolerated silently
17+
* @throws Exception untested
18+
*/
19+
public void testUnknownKey() throws Exception{
1520
assertFalse(this.pool.addWorkItem("test", new Object()));
1621
}
1722

18-
public void testBasicInOut() throws InterruptedException {
23+
/**
24+
* Test add work and remove work
25+
* @throws Exception untested
26+
*/
27+
public void testBasicInOut() throws Exception {
1928
Object one = new Object();
2029
Object two = new Object();
2130

@@ -41,6 +50,10 @@ public void testBasicInOut() throws InterruptedException {
4150
assertNull("Shouldn't be more work", this.pool.nextWorkBlock(workList, 1));
4251
}
4352

53+
/**
54+
* Test add work when work in progress.
55+
* @throws Exception untested
56+
*/
4457
public void testWorkInWhileInProgress() throws Exception {
4558
Object one = new Object();
4659
Object two = new Object();
@@ -65,6 +78,10 @@ public void testWorkInWhileInProgress() throws Exception {
6578
assertEquals(two, workList.get(0));
6679
}
6780

81+
/**
82+
* Test multiple work keys.
83+
* @throws Exception untested
84+
*/
6885
public void testInterleavingKeys() throws Exception {
6986
Object one = new Object();
7087
Object two = new Object();
@@ -92,6 +109,10 @@ public void testInterleavingKeys() throws Exception {
92109
assertEquals(two, workList.get(0));
93110
}
94111

112+
/**
113+
* Test removal of key (with work)
114+
* @throws Exception untested
115+
*/
95116
public void testUnregisterKey() throws Exception {
96117
Object one = new Object();
97118
Object two = new Object();
@@ -113,6 +134,10 @@ public void testUnregisterKey() throws Exception {
113134
assertEquals(two, workList.get(0));
114135
}
115136

137+
/**
138+
* Test removal of all keys (with work).
139+
* @throws Exception untested
140+
*/
116141
public void testUnregisterAllKeys() throws Exception {
117142
Object one = new Object();
118143
Object two = new Object();

0 commit comments

Comments
 (0)