What did you do?
I switched from Carthage to Swift Package Manager for integrating Quick and Nimble into a project. My tests use toEventually() in some places.
What did you expect to happen?
toEventually() should either finish or timeout eventually.
What actually happened instead?
toEventually() never stops, it polls forever and doesn't even timeout. I tried to debug the issue by setting a breakpoint in AwaitPromise.resolveResult()
|
func resolveResult(_ result: AwaitResult<T>) -> Bool { |
|
if signal.wait(timeout: .now()) == .success { |
|
self.asyncResult = result |
|
return true |
|
} else { |
|
return false |
|
} |
|
} |
however, the code seems to never be executed. I also set a breakpoint here
|
if promise.resolveResult(.completed(result)) { |
and observed that the line is called which is really strange.
When executing tests in Release configuration everything works as expected so I assume this is a compiler bug.
Environment
List the software versions you're using:
- Quick: 2.2.0
- Nimble: 8.0.4
- Xcode Version: 11.2 (11B52) (Open Xcode; In menubar: Xcode > About Xcode)
- Swift Version: 5.1.2 (Xcode Default) (Open Xcode Preferences; Components > Toolchains. If none, use
Xcode Default.)
Please also mention which package manager you used and its version. Delete the
other package managers in this list:
Swift Package Manager 5.1.0 (swiftpm-15502) (Use swift build --version in Terminal)
Project that demonstrates the issue
https://github.com/tomquist/NimbleStallBug
What did you do?
I switched from Carthage to Swift Package Manager for integrating Quick and Nimble into a project. My tests use
toEventually()in some places.What did you expect to happen?
toEventually()should either finish or timeout eventually.What actually happened instead?
toEventually()never stops, it polls forever and doesn't even timeout. I tried to debug the issue by setting a breakpoint inAwaitPromise.resolveResult()Nimble/Sources/Nimble/Utils/Await.swift
Lines 118 to 125 in 9a4564e
however, the code seems to never be executed. I also set a breakpoint here
Nimble/Sources/Nimble/Utils/Await.swift
Line 330 in 9a4564e
When executing tests in Release configuration everything works as expected so I assume this is a compiler bug.
Environment
List the software versions you're using:
Xcode Default.)Please also mention which package manager you used and its version. Delete the
other package managers in this list:
Swift Package Manager 5.1.0 (swiftpm-15502) (Use
swift build --versionin Terminal)Project that demonstrates the issue
https://github.com/tomquist/NimbleStallBug