@@ -19,13 +19,13 @@ public class PartitioniedBlockingQueueTest {
19
19
@ Test ()
20
20
public void constructs () {
21
21
// execute & verify
22
- assertNotNull (new PartitionedBlockedQueue (1 ));
22
+ assertNotNull (new PartitionedBlockingQueue (1 ));
23
23
}
24
24
25
25
@ Test ()
26
26
public void acquiresValue () throws InterruptedException {
27
27
// setup
28
- var queue = new PartitionedBlockedQueue <String ,String >(1 );
28
+ var queue = new PartitionedBlockingQueue <String ,String >(1 );
29
29
// execute
30
30
var actual = queue .acquire ("key" , "value" );
31
31
// verify
@@ -35,7 +35,7 @@ public void acquiresValue() throws InterruptedException {
35
35
@ Test ()
36
36
public void acquiresParallelForDifferentPartitions () throws InterruptedException {
37
37
// setup
38
- var queue = new PartitionedBlockedQueue <SpecificHash ,String >(2 );
38
+ var queue = new PartitionedBlockingQueue <SpecificHash ,String >(2 );
39
39
40
40
assertEquals (queue .acquire (new SpecificHash (0 ), "first value" ), "first value" );
41
41
// execute
@@ -47,7 +47,7 @@ public void acquiresParallelForDifferentPartitions() throws InterruptedException
47
47
@ Test ()
48
48
public void releasesAcquiredPartition () throws InterruptedException {
49
49
// setup
50
- var queue = new PartitionedBlockedQueue <String ,String >(1 );
50
+ var queue = new PartitionedBlockingQueue <String ,String >(1 );
51
51
queue .acquire ("key" , "value" );
52
52
// execute & verify
53
53
queue .release ("key" );
@@ -56,7 +56,7 @@ public void releasesAcquiredPartition() throws InterruptedException {
56
56
@ Test ()
57
57
public void acquiresAgainAfterRelease () throws InterruptedException {
58
58
// setup
59
- var queue = new PartitionedBlockedQueue <String ,String >(1 );
59
+ var queue = new PartitionedBlockingQueue <String ,String >(1 );
60
60
61
61
assertEquals (queue .acquire ("key" , "value" ), "value" );
62
62
queue .release ("key" );
@@ -70,7 +70,7 @@ public void acquiresAgainAfterRelease() throws InterruptedException {
70
70
@ Test ()
71
71
public void blocksParallelAcquireToSamePartition () throws InterruptedException {
72
72
// setup
73
- var queue = new PartitionedBlockedQueue <String ,String >(1 );
73
+ var queue = new PartitionedBlockingQueue <String ,String >(1 );
74
74
var eaters = Executors .newFixedThreadPool (1 );
75
75
assertEquals (queue .acquire ("key" , "value" ), "value" );
76
76
var counter = new CountDownLatch (1 );
@@ -92,7 +92,7 @@ public void blocksParallelAcquireToSamePartition() throws InterruptedException{
92
92
@ Test ()
93
93
public void providesAllValues () throws InterruptedException {
94
94
// setup
95
- var queue = new PartitionedBlockedQueue <String ,String >(10 );
95
+ var queue = new PartitionedBlockingQueue <String ,String >(10 );
96
96
var workers = Executors .newFixedThreadPool (30 );
97
97
var numberOfTasks = 1_000 ;
98
98
var expectedValues = IntStream .range (0 , numberOfTasks ).boxed ().map (task -> String .format ("value %s" , task )).collect (Collectors .toList ());
@@ -122,7 +122,7 @@ public void providesAllValues() throws InterruptedException{
122
122
@ Test ()
123
123
public void keepsOrder () throws InterruptedException {
124
124
// setup
125
- var queue = new PartitionedBlockedQueue <String ,String >(1 );
125
+ var queue = new PartitionedBlockingQueue <String ,String >(1 );
126
126
var workers = Executors .newFixedThreadPool (30 );
127
127
var numberOfTasks = 100 ;
128
128
0 commit comments