Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

waitUntil ignores Nimble.AsyncDefaults.Timeout #488

Closed
1 task done
Ricardo1980 opened this issue Nov 30, 2017 · 1 comment
Closed
1 task done

waitUntil ignores Nimble.AsyncDefaults.Timeout #488

Ricardo1980 opened this issue Nov 30, 2017 · 1 comment
Labels

Comments

@Ricardo1980
Copy link

Ricardo1980 commented Nov 30, 2017

  • I have read CONTRIBUTING and have done my best to follow them.

What did you do?

Tried to change the default wait timeout from 1 to 10 using
Nimble.AsyncDefaults.Timeout = 10
but waitUntil continues using 1

What did you expect to happen?

I expected that 10 was going to be used.

What actually happened instead?

It's still using 1.

Environment

List the software versions you're using:

  • Quick: No idea
  • Nimble: 7.0.3
  • Xcode Version: 9.1 (9B55) (Open Xcode; In menubar: Xcode > About Xcode)
  • Swift Version: Xcode Default

Please also mention which package manager you used and its version. Delete the
other package managers in this list:

  • Cocoapods: 1.0.3

Project that demonstrates the issue

In the file DSL+Wait.swift I see:

public func waitUntil(timeout: TimeInterval = 1, file: FileString = #file, line: UInt = #line, action: @escaping (@escaping () -> Void) -> Void) {
    NMBWait.until(timeout: timeout, file: file, line: line, action: action)
}

That means that when I use waitUntil rather than waitUntil(timeout: 5), instead of using Nimble.AsyncDefaults.Timeout = 10, (executed in TestingAppDelegate init, checked with the debugger that is called before the test), 1 will be use as a default value, rather than 10.

Is that normal?

Apart from that (I am still researching this), several of my tests are failing after I moved from xcode 9.0 to 9.1, basically waitUntil fails saying "Waited more than 1.0 second". But if I use waitUntil(timeout: 2) then they work (I am using Mockingjay to simulate a network response).

@ikesyo
Copy link
Member

ikesyo commented Apr 9, 2018

Fixed by #512

@ikesyo ikesyo closed this as completed Apr 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants