3535import java .util .concurrent .atomic .AtomicReference ;
3636import java .util .function .Consumer ;
3737import java .util .stream .Stream ;
38- import org .assertj .core .api .Assertions ;
3938import org .junit .jupiter .api .Test ;
4039import org .junit .jupiter .api .TestInstance ;
4140import org .junit .jupiter .params .ParameterizedTest ;
@@ -96,7 +95,7 @@ public void onComplete() {}
9695 }
9796
9897 @ Test
99- public void basicMaybe () {
98+ void basicMaybe () {
10099 int result = createParentSpan (() -> Maybe .just (1 ).map (this ::addOne ).blockingGet ());
101100 assertThat (result ).isEqualTo (2 );
102101 testing ()
@@ -111,7 +110,7 @@ public void basicMaybe() {
111110 }
112111
113112 @ Test
114- public void twoOperationsMaybe () {
113+ void twoOperationsMaybe () {
115114 int result =
116115 createParentSpan (() -> Maybe .just (2 ).map (this ::addOne ).map (this ::addOne ).blockingGet ());
117116 assertThat (result ).isEqualTo (4 );
@@ -131,7 +130,7 @@ public void twoOperationsMaybe() {
131130 }
132131
133132 @ Test
134- public void delayedMaybe () {
133+ void delayedMaybe () {
135134 int result =
136135 createParentSpan (
137136 () -> Maybe .just (3 ).delay (100 , TimeUnit .MILLISECONDS ).map (this ::addOne ).blockingGet ());
@@ -148,7 +147,7 @@ public void delayedMaybe() {
148147 }
149148
150149 @ Test
151- public void delayedTwiceMaybe () {
150+ void delayedTwiceMaybe () {
152151 int result =
153152 createParentSpan (
154153 () ->
@@ -175,7 +174,7 @@ public void delayedTwiceMaybe() {
175174 }
176175
177176 @ Test
178- public void basicFlowable () {
177+ void basicFlowable () {
179178 Iterable <Integer > result =
180179 createParentSpan (
181180 () -> Flowable .fromIterable (asList (5 , 6 )).map (this ::addOne ).toList ().blockingGet ());
@@ -196,7 +195,7 @@ public void basicFlowable() {
196195 }
197196
198197 @ Test
199- public void twoOperationsFlowable () {
198+ void twoOperationsFlowable () {
200199 List <Integer > result =
201200 createParentSpan (
202201 () ->
@@ -251,17 +250,18 @@ void observableFromCallableContextPropagation() throws InterruptedException {
251250 data -> {
252251 endObservableTraceId .set (Span .current ().getSpanContext ().getTraceId ());
253252 latch .countDown ();
253+ latch .countDown ();
254254 });
255255 assertThat (unused ).isNotNull ();
256256 });
257257
258258 latch .await ();
259- Assertions . assertThat (innerObservableTraceId .get ()).isEqualTo (traceId .get ());
260- Assertions . assertThat (endObservableTraceId .get ()).isEqualTo (traceId .get ());
259+ assertThat (innerObservableTraceId .get ()).isEqualTo (traceId .get ());
260+ assertThat (endObservableTraceId .get ()).isEqualTo (traceId .get ());
261261 }
262262
263263 @ Test
264- public void delayedFlowable () {
264+ void delayedFlowable () {
265265 List <Integer > result =
266266 createParentSpan (
267267 () ->
@@ -287,7 +287,7 @@ public void delayedFlowable() {
287287 }
288288
289289 @ Test
290- public void delayedTwiceFlowable () {
290+ void delayedTwiceFlowable () {
291291 List <Integer > result =
292292 createParentSpan (
293293 () ->
@@ -323,7 +323,7 @@ public void delayedTwiceFlowable() {
323323 }
324324
325325 @ Test
326- public void maybeFromCallable () {
326+ void maybeFromCallable () {
327327 Integer result =
328328 createParentSpan (
329329 () -> Maybe .fromCallable (() -> addOne (10 )).map (this ::addOne ).blockingGet ());
@@ -344,7 +344,7 @@ public void maybeFromCallable() {
344344 }
345345
346346 @ Test
347- public void basicSingle () {
347+ void basicSingle () {
348348 Integer result = createParentSpan (() -> Single .just (0 ).map (this ::addOne ).blockingGet ());
349349 assertThat (result ).isEqualTo (1 );
350350 testing ()
@@ -359,7 +359,7 @@ public void basicSingle() {
359359 }
360360
361361 @ Test
362- public void basicObservable () {
362+ void basicObservable () {
363363 List <Integer > result =
364364 createParentSpan (() -> Observable .just (0 ).map (this ::addOne ).toList ().blockingGet ());
365365 assertThat (result ).contains (1 );
@@ -375,7 +375,7 @@ public void basicObservable() {
375375 }
376376
377377 @ Test
378- public void connectableFlowable () {
378+ void connectableFlowable () {
379379 List <Integer > result =
380380 createParentSpan (
381381 () ->
@@ -397,7 +397,7 @@ public void connectableFlowable() {
397397 }
398398
399399 @ Test
400- public void connectableObservable () {
400+ void connectableObservable () {
401401 List <Integer > result =
402402 createParentSpan (
403403 () ->
@@ -419,7 +419,7 @@ public void connectableObservable() {
419419 }
420420
421421 @ Test
422- public void maybeError () {
422+ void maybeError () {
423423 IllegalStateException error = new IllegalStateException (EXCEPTION_MESSAGE );
424424 assertThatThrownBy (() -> createParentSpan (() -> Maybe .error (error ).blockingGet ()))
425425 .isEqualTo (error );
@@ -431,7 +431,7 @@ public void maybeError() {
431431 }
432432
433433 @ Test
434- public void flowableError () {
434+ void flowableError () {
435435 IllegalStateException error = new IllegalStateException (EXCEPTION_MESSAGE );
436436 assertThatThrownBy (() -> createParentSpan (() -> Flowable .error (error )).toList ().blockingGet ())
437437 .isEqualTo (error );
@@ -443,7 +443,7 @@ public void flowableError() {
443443 }
444444
445445 @ Test
446- public void singleError () {
446+ void singleError () {
447447 IllegalStateException error = new IllegalStateException (EXCEPTION_MESSAGE );
448448 assertThatThrownBy (() -> createParentSpan (() -> Single .error (error )).blockingGet ())
449449 .isEqualTo (error );
@@ -455,7 +455,7 @@ public void singleError() {
455455 }
456456
457457 @ Test
458- public void observableError () {
458+ void observableError () {
459459 IllegalStateException error = new IllegalStateException (EXCEPTION_MESSAGE );
460460 assertThatThrownBy (() -> createParentSpan (() -> Observable .error (error ).toList ().blockingGet ()))
461461 .isEqualTo (error );
@@ -467,7 +467,7 @@ public void observableError() {
467467 }
468468
469469 @ Test
470- public void completableError () {
470+ void completableError () {
471471 IllegalStateException error = new IllegalStateException (EXCEPTION_MESSAGE );
472472 assertThatThrownBy (
473473 () -> createParentSpan (() -> Completable .error (error ).toMaybe ().blockingGet ()))
@@ -480,7 +480,7 @@ public void completableError() {
480480 }
481481
482482 @ Test
483- public void basicMaybeFailure () {
483+ void basicMaybeFailure () {
484484 IllegalStateException error = new IllegalStateException (EXCEPTION_MESSAGE );
485485 assertThatThrownBy (
486486 () ->
@@ -506,7 +506,7 @@ public void basicMaybeFailure() {
506506 }
507507
508508 @ Test
509- public void basicFlowableFailure () {
509+ void basicFlowableFailure () {
510510 IllegalStateException error = new IllegalStateException (EXCEPTION_MESSAGE );
511511 assertThatThrownBy (
512512 () ->
@@ -533,7 +533,7 @@ public void basicFlowableFailure() {
533533 }
534534
535535 @ Test
536- public void basicMaybeCancel () {
536+ void basicMaybeCancel () {
537537 createParentSpan (
538538 () ->
539539 Maybe .just (1 ).toFlowable ().map (this ::addOne ).subscribe (CancellingSubscriber .INSTANCE ));
@@ -545,7 +545,7 @@ public void basicMaybeCancel() {
545545 }
546546
547547 @ Test
548- public void basicFlowableCancel () {
548+ void basicFlowableCancel () {
549549 createParentSpan (
550550 () ->
551551 Flowable .fromIterable (asList (5 , 6 ))
@@ -559,7 +559,7 @@ public void basicFlowableCancel() {
559559 }
560560
561561 @ Test
562- public void basicSingleCancel () {
562+ void basicSingleCancel () {
563563 createParentSpan (
564564 () ->
565565 Single .just (1 ).toFlowable ().map (this ::addOne ).subscribe (CancellingSubscriber .INSTANCE ));
@@ -571,7 +571,7 @@ public void basicSingleCancel() {
571571 }
572572
573573 @ Test
574- public void basicCompletableCancel () {
574+ void basicCompletableCancel () {
575575 createParentSpan (
576576 () ->
577577 Completable .fromCallable (() -> 1 )
@@ -585,7 +585,7 @@ public void basicCompletableCancel() {
585585 }
586586
587587 @ Test
588- public void basicObservableCancel () {
588+ void basicObservableCancel () {
589589 createParentSpan (
590590 () ->
591591 Observable .just (1 )
@@ -600,7 +600,7 @@ public void basicObservableCancel() {
600600 }
601601
602602 @ Test
603- public void basicMaybeChain () {
603+ void basicMaybeChain () {
604604 createParentSpan (
605605 () ->
606606 Maybe .just (1 )
@@ -629,7 +629,7 @@ public void basicMaybeChain() {
629629 }
630630
631631 @ Test
632- public void basicFlowableChain () {
632+ void basicFlowableChain () {
633633 createParentSpan (
634634 () ->
635635 Flowable .fromIterable (asList (5 , 6 ))
@@ -667,7 +667,7 @@ public void basicFlowableChain() {
667667
668668 // Publisher chain spans have the correct parents from subscription time
669669 @ Test
670- public void maybeChainParentSpan () {
670+ void maybeChainParentSpan () {
671671 Maybe <Integer > maybe = Maybe .just (42 ).map (this ::addOne ).map (this ::addTwo );
672672 testing ().runWithSpan ("trace-parent" , () -> maybe .blockingGet ());
673673 testing ()
@@ -686,7 +686,7 @@ public void maybeChainParentSpan() {
686686 }
687687
688688 @ Test
689- public void maybeChainHasSubscriptionContext () {
689+ void maybeChainHasSubscriptionContext () {
690690 Integer result =
691691 createParentSpan (
692692 () -> {
@@ -716,7 +716,7 @@ public void maybeChainHasSubscriptionContext() {
716716 }
717717
718718 @ Test
719- public void flowableChainHasSubscriptionContext () {
719+ void flowableChainHasSubscriptionContext () {
720720 List <Integer > result =
721721 createParentSpan (
722722 () -> {
@@ -755,7 +755,7 @@ public void flowableChainHasSubscriptionContext() {
755755 }
756756
757757 @ Test
758- public void singleChainHasSubscriptionContext () {
758+ void singleChainHasSubscriptionContext () {
759759 Integer result =
760760 createParentSpan (
761761 () -> {
@@ -785,7 +785,7 @@ public void singleChainHasSubscriptionContext() {
785785 }
786786
787787 @ Test
788- public void observableChainHasSubscriptionContext () {
788+ void observableChainHasSubscriptionContext () {
789789 List <Integer > result =
790790 createParentSpan (
791791 () -> {
@@ -817,7 +817,7 @@ public void observableChainHasSubscriptionContext() {
817817
818818 @ ParameterizedTest
819819 @ MethodSource ("schedulers" )
820- public void flowableMultiResults (Scheduler scheduler ) {
820+ void flowableMultiResults (Scheduler scheduler ) {
821821 List <Integer > result =
822822 testing ()
823823 .runWithSpan (
@@ -857,7 +857,7 @@ public void flowableMultiResults(Scheduler scheduler) {
857857
858858 @ ParameterizedTest
859859 @ MethodSource ("schedulers" )
860- public void maybeMultipleTraceChains (Scheduler scheduler ) {
860+ void maybeMultipleTraceChains (Scheduler scheduler ) {
861861 int iterations = 100 ;
862862 RxJava3ConcurrencyTestHelper .launchAndWait (scheduler , iterations , 60000 , testing ());
863863 @ SuppressWarnings ("unchecked" )
0 commit comments