File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
net.lecousin.core/src/test/java/net/lecousin/framework/core/tests/concurrent/async Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -315,6 +315,10 @@ public void run() {
315
315
AsyncSupplier <Long , NoException > awl = awi .thenStart (converter , true );
316
316
awi .unblockSuccess (Integer .valueOf (51 ));
317
317
Assert .assertEquals (51L , awl .blockResult (5000 ).longValue ());
318
+ converter = new Task .Cpu .Parameter .FromFunction <Integer , Long >(
319
+ "converter" , Task .PRIORITY_NORMAL ,
320
+ i -> Long .valueOf (i .longValue ())
321
+ );
318
322
awi = new AsyncSupplier <>();
319
323
awl = awi .thenStart (converter , false );
320
324
awi .unblockSuccess (Integer .valueOf (51 ));
@@ -325,7 +329,9 @@ public void run() {
325
329
awi .thenDoOrStart (i -> okResult .set (i .intValue ()), "test" , Task .PRIORITY_NORMAL );
326
330
Assert .assertEquals (0 , okResult .get ());
327
331
awi .unblockSuccess (Integer .valueOf (51 ));
328
- while (okResult .get () != 51 );
332
+ while (okResult .get () != 51 ) {
333
+ new Async <Exception >().block (100 );
334
+ }
329
335
330
336
awi = new AsyncSupplier <>();
331
337
okResult .set (0 );
You can’t perform that action at this time.
0 commit comments