File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ final class BuildSystemTests: XCTestCase {
92
92
// hackery to synchronously wait for a task to finish. This is very much an
93
93
// anti-pattern because it can easily lead to priority inversions and should
94
94
// thus not be copied to any non-test code.
95
- let sema = DispatchSemaphore ( value : 0 )
95
+ let setUpCompleted = XCTestExpectation ( description : " Waiting for set up " )
96
96
Task {
97
97
haveClangd = ToolchainRegistry . shared. toolchains. contains { $0. clangd != nil }
98
98
testServer = TestSourceKitServer ( )
@@ -123,9 +123,11 @@ final class BuildSystemTests: XCTestCase {
123
123
capabilities: ClientCapabilities ( workspace: nil , textDocument: nil ) ,
124
124
trace: . off,
125
125
workspaceFolders: nil ) )
126
- sema. signal ( )
126
+ setUpCompleted. fulfill ( )
127
+ }
128
+ if XCTWaiter . wait ( for: [ setUpCompleted] , timeout: defaultTimeout) != . completed {
129
+ XCTFail ( " Set up failed to complete " )
127
130
}
128
- sema. wait ( )
129
131
}
130
132
131
133
override func tearDown( ) {
You can’t perform that action at this time.
0 commit comments