Comments (4)
Disregard request. Apparently we had "dispatch_async(dispatch_get_main_queue()) {" in a parallel test that was not wrapped into waitUntil, so test case was "finished" buts its code still was working and affected tests close to it.
from nimble.
I actually would like to reopen bug, as it is not clearly some specific project implementation issue but more fundamental Nimble issue. Here is a test that clearly shows how issue looks like — https://github.com/nikita-leonov/NimbleWaitUntilError
with some pre-steps following "it" will fail:
it("will fail.") {
waitUntil { done in
done()
}
}
I didn't investigate yet on alternative for waitUntil implementation, but hopefully there is a way that will allow to provide better isolation.
from nimble.
Hey @nikita-leonov thanks for the bug report.
I looked into this, but I'm also not sure how to resolve this. Due to the nature of the run loop, there is no way to advance the run loop without potentially hitting expensive code on the main thread. It is currently intended behavior, but not ideal.
As a reference note, XCTest's async expectations also exhibits this failure (although it bails out). The best I can do is bailout early when seeing a stalled main thread.
from nimble.
@jeffh thanks for an update. Indeed solution of such task is questionable, while having some additional log information may at least give an understanding that there is a "third-party" effects affecting test results and require additional care. Indeed solution proposed by you may save my day if it was in code before :)
from nimble.
Related Issues (20)
- Build failing on Xcode 14.3 for WatchOS (arm64, i386, x86_64) HOT 2
- Xcode 15: Foundation in iOS 17/macOS Sonoma has a new `Predicate` type which can conflict with Nimble's `Predicate`. HOT 4
- Integrate individual platform targets into a single multiplatform target
- Is this framework support SwiftUI Unit / UI testing HOT 1
- Improper use of expect() in describe() block cause test-case enumeration to fail HOT 2
- Error "any AssertionHandler' has no member 'assertionFailure" when running example test HOT 7
- Xcode 15: `DEFINES_MODULE` was set, but no umbrella header warning HOT 5
- Predicate equal doesn't work as expected with NSObject
- `throwAssertion` not working with Swift Concurrency HOT 1
- Nimble.PollingDefaults.timeout is set to 30 seconds, but toEventually gives up after ~5 HOT 2
- toEventually in Xcode 15 somtimes results in "main run loop was unresponsive" HOT 1
- Question: Advice on using toEventually with UIViewController/UIView in XCTestCase
- Discussion about the project setup and Carthage usage HOT 2
- Quick 7.3.0 and Nimble 13.0.0 ERROR : "Instance member 'testVariablesNotNil' cannot be used on type 'ConditionSelectionTests'" HOT 1
- Attempted to report a test failure to XCTest while no test case was running HOT 5
- Add a `require` function, similar to `expect`, which either returns the expression if it passes, or throws if it fails.
- Privacy Manifest
- Move matcher documentation out of README.md
- Support localization in matchers.
- `throwAssertion` does not work on macOS HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nimble.