Comments (12)
I've just had it happen again, so this change does not fix the problem. Needs more investigation as to what the differences are between the two approaches. My SenTestKit category definitely doesn't show this behaviour, it only started showing up when converting one of our tests to expecta format. I much prefer expecta's syntax and conciseness - will try and get this to work.
from expecta.
@sas71, any progress? I've started seeing this as well, although it could be related to upgrading to Xcode 5.
I've tried 3 or 4 different Obj-C unit testing solutions, looking for something that can deal with asynchronicity in a robust fashion, and have yet to find it.
from expecta.
Not yet, unfortunately. Have you tried the version I've linked to above? Just to get an idea if there's a working version to compare to or if there's a general problem.
from expecta.
could you give specta's AsyncBlock feature a try?
from expecta.
I've had some time to revisit this and just noticed that these failures only seem to happen when using Xcode 5. I'll try to dig deeper. I'll also look at AsyncBlock as soon as I find the time, Peter.
from expecta.
Any progress? I have the same problems when I rig my test using an AsyncBlock from Specta.
from expecta.
I’m afraid not. We’ve had to abandon this for now due to lack of time to investigate further.
Dr. Sven A. Schmidt
[email protected] | http://feinstruktur.com
On 7 Jan 2014, at 17:56, Brennon Bortz [email protected] wrote:
Any progress? I have the same problems when I rig my test using an AsyncBlock from Specta.
—
Reply to this email directly or view it on GitHub.
from expecta.
FWIW, it appears that there may have been an underlying bug in Xcode. If you have some time, give the same tests another go under Xcode 5.1 — I'm seeing much more consistent results now.
from expecta.
Nope, I'm still seeing this in Xcode 6.0.1. Something is not right, but I haven't been able to figure out what.
@petejkim what are the differences in how Specta's AsyncBlock handles this compared to Expecta's will/willNot
?
from expecta.
will/willNot
is not reliable for me at all. It works for a while — long enough for me to believe that a test has been fixed — but when I implement a few more tests, the tests involving will
start hanging indefinitely, preventing normal test execution from occurring.
If it hangs once, it consistently hangs.
Pretty mysterious. I've not set the timeout value at all either.
UPDATE: curiously still, I tried using https://github.com/hfossli/AGAsyncTestHelper to replace the will calls, but I get the nonterminating behaviour.
Could it be because I'm trying to check against a Core Data attribute that's causing the loop?
With Expecta:
expect(recipe.needsSync).will.equal(@YES);
With AGAsyncTestHelper:
AGWW_WAIT_WHILE_NOT_EQUALS(recipe.needsSync, @YES, 0.5);
from expecta.
Is there any update about it? I am sometimes getting random fails when using will
Also, it sometimes get stuck when applyMatcher:to
gets called. Here:
Line 123
[[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.01]];
from expecta.
I started using Expecta very recently and was very happy and impressed, but I'm having some nondeterministic trouble using will
matching as well, in my case it only happens for a specific test running on Travis. It passes on Xcode and fastlane locally, but fails on CI.
from expecta.
Related Issues (20)
- Matchers do not warn on improper use HOT 10
- Async testing and beInstanceOf HOT 1
- expecting notifications not working? HOT 5
- beKindOf() does not match __NSTaggedDate with NSDate HOT 1
- If test fails, notify if comparing two different types/classes
- Compiler warnings on iOS9 / XCode 7 HOT 3
- Carthage Binaries HOT 1
- Migration to ARC HOT 5
- Add class information to EXPDescribeObject HOT 5
- XCTest does not contain bitcode
- Give more descriptive message on `beInstanceOf` when `Class` is passed in expect. HOT 1
- Custom matcher for promises
- Receive and beEvaluated matchers, mocks HOT 7
- Didn't highlight assert fail line number in Xcode 8
- Build warning about ALWAYS_SEARCH_USER_PATHS HOT 1
- iOS 10 deprecation warning HOT 1
- 1.0.6 release does not include an iOS framework HOT 1
- sspitzer HOT 2
- Incompatible with Specta 2.0.0
- Dependent pods fail linting due to very old deployment target on Xcode 15.3
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 expecta.