@@ -125,16 +125,16 @@ public function testCancel(): void
125
125
public function testCancelAll (): void
126
126
{
127
127
$ logger = new RunnableQueueLoggerStub ();
128
- $ queue = new RunnableQueue ($ logger , 4 );
128
+ $ queue = new RunnableQueue ($ logger , 6 );
129
129
$ one = new RunnableStub ('1 ' );
130
130
$ two = new RunnableStub ('2 ' );
131
131
$ three = new RunnableStub ('3 ' );
132
132
$ queue ->queue ($ one , 3 );
133
133
$ queue ->queue ($ two , 2 );
134
134
$ queue ->queue ($ three , 3 );
135
135
136
- $ this ->assertSame (5 , $ queue ->getQueueSize ());
137
- $ this ->assertSame (3 , $ queue ->getRunningSize ());
136
+ $ this ->assertSame (3 , $ queue ->getQueueSize ());
137
+ $ this ->assertSame (5 , $ queue ->getRunningSize ());
138
138
139
139
$ queue ->cancelAll ();
140
140
$ this ->assertSame (0 , $ queue ->getQueueSize ());
@@ -145,19 +145,18 @@ public function testCancelAll(): void
145
145
1 => 'Removing top item from queue - new size is 3 ' ,
146
146
2 => 'Running process 1 ' ,
147
147
3 => 'Queue not full - looking at first item in the queue ' ,
148
- 4 => 'Canot remote first item from the queue - it has size 2, current queue size is 3, new size would be 5 ' ,
149
- 5 => 'Queue not full - looking at first item in the queue ' ,
150
- 6 => 'Canot remote first item from the queue - it has size 2, current queue size is 3, new size would be 5 ' ,
151
- 7 => 'Process 1 finished unsuccessfully: Runnable 1 canceled ' ,
152
- 8 => 'Queue not full - looking at first item in the queue ' ,
153
- 9 => 'Removing top item from queue - new size is 2 ' ,
154
- 10 => 'Running process 2 ' ,
155
- 11 => 'Process 2 finished unsuccessfully: Runnable 2 canceled ' ,
156
- 12 => 'Queue not full - looking at first item in the queue ' ,
157
- 13 => 'Removing top item from queue - new size is 3 ' ,
158
- 14 => 'Running process 3 ' ,
159
- 15 => 'Process 3 finished unsuccessfully: Runnable 3 canceled ' ,
160
- 16 => 'Queue empty ' ,
148
+ 4 => 'Removing top item from queue - new size is 5 ' ,
149
+ 5 => 'Running process 2 ' ,
150
+ 6 => 'Queue not full - looking at first item in the queue ' ,
151
+ 7 => 'Canot remote first item from the queue - it has size 3, current queue size is 5, new size would be 8 ' ,
152
+ 8 => 'Process 1 finished unsuccessfully: Runnable 1 canceled ' ,
153
+ 9 => 'Queue not full - looking at first item in the queue ' ,
154
+ 10 => 'Removing top item from queue - new size is 5 ' ,
155
+ 11 => 'Running process 3 ' ,
156
+ 12 => 'Process 3 finished unsuccessfully: Runnable 3 canceled ' ,
157
+ 13 => 'Queue empty ' ,
158
+ 14 => 'Process 2 finished unsuccessfully: Runnable 2 canceled ' ,
159
+ 15 => 'Queue empty ' ,
161
160
], $ logger ->getMessages ());
162
161
}
163
162
0 commit comments