@@ -81,6 +81,7 @@ final class ServiceGroupTests: XCTestCase {
81
81
}
82
82
}
83
83
84
+ #if !os(Windows)
84
85
func test_whenRun_ShutdownGracefully( ) async throws {
85
86
let mockService = MockService ( description: " Service1 " )
86
87
let serviceGroup = self . makeServiceGroup (
@@ -103,6 +104,7 @@ final class ServiceGroupTests: XCTestCase {
103
104
await mockService. resumeRunContinuation ( with: . success( ( ) ) )
104
105
}
105
106
}
107
+ #endif
106
108
107
109
func testRun_whenServiceExitsEarly( ) async throws {
108
110
let mockService = MockService ( description: " Service1 " )
@@ -469,6 +471,7 @@ final class ServiceGroupTests: XCTestCase {
469
471
}
470
472
}
471
473
474
+ #if !os(Windows)
472
475
func testCancellationSignal( ) async throws {
473
476
let service1 = MockService ( description: " Service1 " )
474
477
let service2 = MockService ( description: " Service2 " )
@@ -507,7 +510,9 @@ final class ServiceGroupTests: XCTestCase {
507
510
await XCTAsyncAssertNoThrow ( try await group. next ( ) )
508
511
}
509
512
}
513
+ #endif
510
514
515
+ #if !os(Windows)
511
516
func testCancellationSignal_afterGracefulShutdownSignal( ) async throws {
512
517
let service1 = MockService ( description: " Service1 " )
513
518
let service2 = MockService ( description: " Service2 " )
@@ -560,7 +565,9 @@ final class ServiceGroupTests: XCTestCase {
560
565
await XCTAsyncAssertNoThrow ( try await group. next ( ) )
561
566
}
562
567
}
568
+ #endif
563
569
570
+ #if !os(Windows)
564
571
func testGracefulShutdownOrdering( ) async throws {
565
572
let service1 = MockService ( description: " Service1 " )
566
573
let service2 = MockService ( description: " Service2 " )
@@ -624,7 +631,9 @@ final class ServiceGroupTests: XCTestCase {
624
631
await service1. resumeRunContinuation ( with: . success( ( ) ) )
625
632
}
626
633
}
634
+ #endif
627
635
636
+ #if !os(Windows)
628
637
func testGracefulShutdownOrdering_whenServiceThrows( ) async throws {
629
638
let service1 = MockService ( description: " Service1 " )
630
639
let service2 = MockService ( description: " Service2 " )
@@ -688,7 +697,9 @@ final class ServiceGroupTests: XCTestCase {
688
697
}
689
698
}
690
699
}
700
+ #endif
691
701
702
+ #if !os(Windows)
692
703
func testGracefulShutdownOrdering_whenServiceThrows_andServiceGracefullyShutsdown( ) async throws {
693
704
let service1 = MockService ( description: " Service1 " )
694
705
let service2 = MockService ( description: " Service2 " )
@@ -756,7 +767,9 @@ final class ServiceGroupTests: XCTestCase {
756
767
}
757
768
}
758
769
}
770
+ #endif
759
771
772
+ #if !os(Windows)
760
773
func testGracefulShutdownOrdering_whenServiceExits( ) async throws {
761
774
let service1 = MockService ( description: " Service1 " )
762
775
let service2 = MockService ( description: " Service2 " )
@@ -816,7 +829,9 @@ final class ServiceGroupTests: XCTestCase {
816
829
await service2. resumeRunContinuation ( with: . success( ( ) ) )
817
830
}
818
831
}
832
+ #endif
819
833
834
+ #if !os(Windows)
820
835
func testGracefulShutdownOrdering_whenServiceExits_andIgnoringThrows( ) async throws {
821
836
let service1 = MockService ( description: " Service1 " )
822
837
let service2 = MockService ( description: " Service2 " )
@@ -885,8 +900,10 @@ final class ServiceGroupTests: XCTestCase {
885
900
XCTAssertTrue ( $0 is ExampleError )
886
901
}
887
902
}
903
+ #endif
888
904
}
889
905
906
+ #if !os(Windows)
890
907
func testNestedServiceLifecycle( ) async throws {
891
908
struct NestedGroupService : Service {
892
909
let group : ServiceGroup
@@ -1007,6 +1024,7 @@ final class ServiceGroupTests: XCTestCase {
1007
1024
await service2. resumeRunContinuation ( with: . success( ( ) ) )
1008
1025
}
1009
1026
}
1027
+ #endif
1010
1028
1011
1029
func testGracefulShutdownEscalation( ) async throws {
1012
1030
let mockService = MockService ( description: " Service1 " )
@@ -1501,3 +1519,4 @@ final class ServiceGroupTests: XCTestCase {
1501
1519
)
1502
1520
}
1503
1521
}
1522
+ #endif
0 commit comments