@@ -5,7 +5,7 @@ import NIO
5
5
6
6
class StarWarsQueryTests : XCTestCase {
7
7
func testHeroNameQuery( ) throws {
8
- let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: 1 )
8
+ let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: System . coreCount )
9
9
10
10
defer {
11
11
XCTAssertNoThrow ( try eventLoopGroup. syncShutdownGracefully ( ) )
@@ -37,7 +37,7 @@ class StarWarsQueryTests : XCTestCase {
37
37
}
38
38
39
39
func testHeroNameAndFriendsQuery( ) throws {
40
- let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: 1 )
40
+ let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: System . coreCount )
41
41
42
42
defer {
43
43
XCTAssertNoThrow ( try eventLoopGroup. syncShutdownGracefully ( ) )
@@ -79,7 +79,7 @@ class StarWarsQueryTests : XCTestCase {
79
79
}
80
80
81
81
func testNestedQuery( ) throws {
82
- let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: 1 )
82
+ let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: System . coreCount )
83
83
84
84
defer {
85
85
XCTAssertNoThrow ( try eventLoopGroup. syncShutdownGracefully ( ) )
@@ -144,7 +144,7 @@ class StarWarsQueryTests : XCTestCase {
144
144
}
145
145
146
146
func testFetchLukeQuery( ) throws {
147
- let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: 1 )
147
+ let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: System . coreCount )
148
148
defer {
149
149
XCTAssertNoThrow ( try eventLoopGroup. syncShutdownGracefully ( ) )
150
150
}
@@ -168,7 +168,7 @@ class StarWarsQueryTests : XCTestCase {
168
168
}
169
169
170
170
func testOptionalVariable( ) throws {
171
- let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: 1 )
171
+ let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: System . coreCount )
172
172
defer {
173
173
XCTAssertNoThrow ( try eventLoopGroup. syncShutdownGracefully ( ) )
174
174
}
@@ -215,7 +215,7 @@ class StarWarsQueryTests : XCTestCase {
215
215
}
216
216
217
217
func testFetchSomeIDQuery( ) throws {
218
- let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: 1 )
218
+ let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: System . coreCount )
219
219
defer {
220
220
XCTAssertNoThrow ( try eventLoopGroup. syncShutdownGracefully ( ) )
221
221
}
@@ -276,7 +276,7 @@ class StarWarsQueryTests : XCTestCase {
276
276
}
277
277
278
278
func testFetchLukeAliasedQuery( ) throws {
279
- let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: 1 )
279
+ let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: System . coreCount )
280
280
defer {
281
281
XCTAssertNoThrow ( try eventLoopGroup. syncShutdownGracefully ( ) )
282
282
}
@@ -300,7 +300,7 @@ class StarWarsQueryTests : XCTestCase {
300
300
}
301
301
302
302
func testFetchLukeAndLeiaAliasedQuery( ) throws {
303
- let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: 1 )
303
+ let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: System . coreCount )
304
304
defer {
305
305
XCTAssertNoThrow ( try eventLoopGroup. syncShutdownGracefully ( ) )
306
306
}
@@ -330,7 +330,7 @@ class StarWarsQueryTests : XCTestCase {
330
330
}
331
331
332
332
func testDuplicateFieldsQuery( ) throws {
333
- let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: 1 )
333
+ let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: System . coreCount )
334
334
defer {
335
335
XCTAssertNoThrow ( try eventLoopGroup. syncShutdownGracefully ( ) )
336
336
}
@@ -364,7 +364,7 @@ class StarWarsQueryTests : XCTestCase {
364
364
}
365
365
366
366
func testUseFragmentQuery( ) throws {
367
- let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: 1 )
367
+ let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: System . coreCount )
368
368
defer {
369
369
XCTAssertNoThrow ( try eventLoopGroup. syncShutdownGracefully ( ) )
370
370
}
@@ -400,7 +400,7 @@ class StarWarsQueryTests : XCTestCase {
400
400
}
401
401
402
402
func testCheckTypeOfR2Query( ) throws {
403
- let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: 1 )
403
+ let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: System . coreCount )
404
404
defer {
405
405
XCTAssertNoThrow ( try eventLoopGroup. syncShutdownGracefully ( ) )
406
406
}
@@ -431,7 +431,7 @@ class StarWarsQueryTests : XCTestCase {
431
431
}
432
432
433
433
func testCheckTypeOfLukeQuery( ) throws {
434
- let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: 1 )
434
+ let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: System . coreCount )
435
435
defer {
436
436
XCTAssertNoThrow ( try eventLoopGroup. syncShutdownGracefully ( ) )
437
437
}
@@ -457,7 +457,7 @@ class StarWarsQueryTests : XCTestCase {
457
457
}
458
458
459
459
func testSecretBackstoryQuery( ) throws {
460
- let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: 1 )
460
+ let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: System . coreCount )
461
461
defer {
462
462
XCTAssertNoThrow ( try eventLoopGroup. syncShutdownGracefully ( ) )
463
463
}
@@ -490,7 +490,7 @@ class StarWarsQueryTests : XCTestCase {
490
490
}
491
491
492
492
func testSecretBackstoryListQuery( ) throws {
493
- let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: 1 )
493
+ let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: System . coreCount )
494
494
defer {
495
495
XCTAssertNoThrow ( try eventLoopGroup. syncShutdownGracefully ( ) )
496
496
}
@@ -549,7 +549,7 @@ class StarWarsQueryTests : XCTestCase {
549
549
}
550
550
551
551
func testSecretBackstoryAliasQuery( ) throws {
552
- let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: 1 )
552
+ let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: System . coreCount )
553
553
defer {
554
554
XCTAssertNoThrow ( try eventLoopGroup. syncShutdownGracefully ( ) )
555
555
}
@@ -582,7 +582,7 @@ class StarWarsQueryTests : XCTestCase {
582
582
}
583
583
584
584
func testNonNullableFieldsQuery( ) throws {
585
- let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: 1 )
585
+ let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: System . coreCount )
586
586
defer {
587
587
XCTAssertNoThrow ( try eventLoopGroup. syncShutdownGracefully ( ) )
588
588
}
0 commit comments