@@ -543,6 +543,9 @@ internal class RealRenderTesterTest {
543
543
}
544
544
545
545
val workflow = Workflow .stateless<Unit , Nothing , Unit > {
546
+ // Suppress runningWorker usage because we want to make sure the internal exception
547
+ // is not thrown when we don't expect an output
548
+ @Suppress(" DEPRECATION" )
546
549
runningWorker(worker)
547
550
}
548
551
val tester = workflow.testRender(Unit )
@@ -584,6 +587,9 @@ internal class RealRenderTesterTest {
584
587
val worker = MySpecialWorker ()
585
588
586
589
val workflow = Workflow .stateless<Unit , Nothing , Unit > {
590
+ // Suppress runningWorker usage because we are testing/validating the internal
591
+ // exception that is thrown
592
+ @Suppress(" DEPRECATION" )
587
593
runningWorker(worker)
588
594
}
589
595
val tester = workflow.testRender(Unit ).requireExplicitWorkerExpectations()
@@ -626,6 +632,9 @@ internal class RealRenderTesterTest {
626
632
}
627
633
628
634
val workflow = Workflow .stateless<Unit , Nothing , Unit > {
635
+ // Suppress runningWorker usage because we want to make sure the internal exception
636
+ // is not thrown when we don't expect an output, even with a unique key specified
637
+ @Suppress(" DEPRECATION" )
629
638
runningWorker(worker, key = " key" )
630
639
}
631
640
val tester = workflow.testRender(Unit )
@@ -641,6 +650,9 @@ internal class RealRenderTesterTest {
641
650
}
642
651
643
652
val workflow = Workflow .stateless<Unit , Nothing , Unit > {
653
+ // Suppress runningWorker usage because we are
654
+ // testing/validating the internal exception that is thrown
655
+ @Suppress(" DEPRECATION" )
644
656
runningWorker(worker, key = " key" )
645
657
}
646
658
val tester = workflow.testRender(Unit )
@@ -662,6 +674,9 @@ internal class RealRenderTesterTest {
662
674
}
663
675
664
676
val workflow = Workflow .stateless<Unit , Nothing , Unit > {
677
+ // Suppress runningWorker usage because we are
678
+ // expecting an exception to be thrown with mismatched keys
679
+ @Suppress(" DEPRECATION" )
665
680
runningWorker(worker, key = " key" )
666
681
}
667
682
val tester = workflow.testRender(Unit )
@@ -687,6 +702,7 @@ internal class RealRenderTesterTest {
687
702
688
703
val worker = EmptyWorker ()
689
704
val workflow = Workflow .stateless<Unit , Nothing , Unit > {
705
+ @Suppress(" DEPRECATION" )
690
706
runningWorker(worker)
691
707
}
692
708
val tester = workflow.testRender(Unit )
@@ -711,6 +727,9 @@ internal class RealRenderTesterTest {
711
727
val stringWorker: Worker <String > = emptyFlow<String >().asWorker()
712
728
713
729
val workflow = Workflow .stateless<Unit , Nothing , Unit > {
730
+ // Suppress usage as we are testing a comparisons of unique workers
731
+ // even though they have the same key.
732
+ @Suppress(" DEPRECATION" )
714
733
runningWorker(lifecycleWorker)
715
734
runningWorker(stringWorker) { noAction() }
716
735
}
@@ -722,7 +741,11 @@ internal class RealRenderTesterTest {
722
741
// No exception, no bug.
723
742
}
724
743
725
- @Test fun `runningWorker distinguishes between specific Nothing workers` () {
744
+ // Suppress runningWorker in this test as we are testing the
745
+ // uniqueness of workers using similar objects as keys
746
+ @Suppress(" DEPRECATION" )
747
+ @Test
748
+ fun `runningWorker distinguishes between specific Nothing workers` () {
726
749
val workerA = object : LifecycleWorker () {}
727
750
val workerB = object : LifecycleWorker () {}
728
751
0 commit comments