@@ -5,7 +5,7 @@ import NIO
55
66class StarWarsQueryTests : XCTestCase {
77 func testHeroNameQuery( ) throws {
8- let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: 1 )
8+ let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: System . coreCount )
99
1010 defer {
1111 XCTAssertNoThrow ( try eventLoopGroup. syncShutdownGracefully ( ) )
@@ -37,7 +37,7 @@ class StarWarsQueryTests : XCTestCase {
3737 }
3838
3939 func testHeroNameAndFriendsQuery( ) throws {
40- let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: 1 )
40+ let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: System . coreCount )
4141
4242 defer {
4343 XCTAssertNoThrow ( try eventLoopGroup. syncShutdownGracefully ( ) )
@@ -79,7 +79,7 @@ class StarWarsQueryTests : XCTestCase {
7979 }
8080
8181 func testNestedQuery( ) throws {
82- let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: 1 )
82+ let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: System . coreCount )
8383
8484 defer {
8585 XCTAssertNoThrow ( try eventLoopGroup. syncShutdownGracefully ( ) )
@@ -144,7 +144,7 @@ class StarWarsQueryTests : XCTestCase {
144144 }
145145
146146 func testFetchLukeQuery( ) throws {
147- let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: 1 )
147+ let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: System . coreCount )
148148 defer {
149149 XCTAssertNoThrow ( try eventLoopGroup. syncShutdownGracefully ( ) )
150150 }
@@ -168,7 +168,7 @@ class StarWarsQueryTests : XCTestCase {
168168 }
169169
170170 func testOptionalVariable( ) throws {
171- let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: 1 )
171+ let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: System . coreCount )
172172 defer {
173173 XCTAssertNoThrow ( try eventLoopGroup. syncShutdownGracefully ( ) )
174174 }
@@ -215,7 +215,7 @@ class StarWarsQueryTests : XCTestCase {
215215 }
216216
217217 func testFetchSomeIDQuery( ) throws {
218- let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: 1 )
218+ let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: System . coreCount )
219219 defer {
220220 XCTAssertNoThrow ( try eventLoopGroup. syncShutdownGracefully ( ) )
221221 }
@@ -276,7 +276,7 @@ class StarWarsQueryTests : XCTestCase {
276276 }
277277
278278 func testFetchLukeAliasedQuery( ) throws {
279- let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: 1 )
279+ let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: System . coreCount )
280280 defer {
281281 XCTAssertNoThrow ( try eventLoopGroup. syncShutdownGracefully ( ) )
282282 }
@@ -300,7 +300,7 @@ class StarWarsQueryTests : XCTestCase {
300300 }
301301
302302 func testFetchLukeAndLeiaAliasedQuery( ) throws {
303- let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: 1 )
303+ let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: System . coreCount )
304304 defer {
305305 XCTAssertNoThrow ( try eventLoopGroup. syncShutdownGracefully ( ) )
306306 }
@@ -330,7 +330,7 @@ class StarWarsQueryTests : XCTestCase {
330330 }
331331
332332 func testDuplicateFieldsQuery( ) throws {
333- let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: 1 )
333+ let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: System . coreCount )
334334 defer {
335335 XCTAssertNoThrow ( try eventLoopGroup. syncShutdownGracefully ( ) )
336336 }
@@ -364,7 +364,7 @@ class StarWarsQueryTests : XCTestCase {
364364 }
365365
366366 func testUseFragmentQuery( ) throws {
367- let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: 1 )
367+ let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: System . coreCount )
368368 defer {
369369 XCTAssertNoThrow ( try eventLoopGroup. syncShutdownGracefully ( ) )
370370 }
@@ -400,7 +400,7 @@ class StarWarsQueryTests : XCTestCase {
400400 }
401401
402402 func testCheckTypeOfR2Query( ) throws {
403- let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: 1 )
403+ let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: System . coreCount )
404404 defer {
405405 XCTAssertNoThrow ( try eventLoopGroup. syncShutdownGracefully ( ) )
406406 }
@@ -431,7 +431,7 @@ class StarWarsQueryTests : XCTestCase {
431431 }
432432
433433 func testCheckTypeOfLukeQuery( ) throws {
434- let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: 1 )
434+ let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: System . coreCount )
435435 defer {
436436 XCTAssertNoThrow ( try eventLoopGroup. syncShutdownGracefully ( ) )
437437 }
@@ -457,7 +457,7 @@ class StarWarsQueryTests : XCTestCase {
457457 }
458458
459459 func testSecretBackstoryQuery( ) throws {
460- let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: 1 )
460+ let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: System . coreCount )
461461 defer {
462462 XCTAssertNoThrow ( try eventLoopGroup. syncShutdownGracefully ( ) )
463463 }
@@ -490,7 +490,7 @@ class StarWarsQueryTests : XCTestCase {
490490 }
491491
492492 func testSecretBackstoryListQuery( ) throws {
493- let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: 1 )
493+ let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: System . coreCount )
494494 defer {
495495 XCTAssertNoThrow ( try eventLoopGroup. syncShutdownGracefully ( ) )
496496 }
@@ -549,7 +549,7 @@ class StarWarsQueryTests : XCTestCase {
549549 }
550550
551551 func testSecretBackstoryAliasQuery( ) throws {
552- let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: 1 )
552+ let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: System . coreCount )
553553 defer {
554554 XCTAssertNoThrow ( try eventLoopGroup. syncShutdownGracefully ( ) )
555555 }
@@ -582,7 +582,7 @@ class StarWarsQueryTests : XCTestCase {
582582 }
583583
584584 func testNonNullableFieldsQuery( ) throws {
585- let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: 1 )
585+ let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: System . coreCount )
586586 defer {
587587 XCTAssertNoThrow ( try eventLoopGroup. syncShutdownGracefully ( ) )
588588 }
0 commit comments