Skip to content

Commit d25254b

Browse files
test: Moves test off of global dispatch queue
This was causing test hangs on macOS
1 parent 1bc642c commit d25254b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Tests/GraphQLTests/FieldExecutionStrategyTests/FieldExecutionStrategyTests.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import Dispatch
22
@testable import GraphQL
33
import XCTest
44

5+
let queue = DispatchQueue(label: "testQueue")
6+
57
class FieldExecutionStrategyTests: XCTestCase {
68
enum StrategyError: Error {
79
case exampleError(msg: String)
@@ -24,7 +26,7 @@ class FieldExecutionStrategyTests: XCTestCase {
2426
let group = DispatchGroup()
2527
group.enter()
2628

27-
DispatchQueue.global().asyncAfter(wallDeadline: .now() + 0.1) {
29+
queue.asyncAfter(wallDeadline: .now() + 0.1) {
2830
group.leave()
2931
}
3032

@@ -41,7 +43,7 @@ class FieldExecutionStrategyTests: XCTestCase {
4143
let g = DispatchGroup()
4244
g.enter()
4345

44-
DispatchQueue.global().asyncAfter(wallDeadline: .now() + 0.1) {
46+
queue.asyncAfter(wallDeadline: .now() + 0.1) {
4547
g.leave()
4648
}
4749

0 commit comments

Comments
 (0)