GithubHelp home page GithubHelp logo

Comments (4)

nikita-leonov avatar nikita-leonov commented on May 22, 2024

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.

nikita-leonov avatar nikita-leonov commented on May 22, 2024

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.

jeffh avatar jeffh commented on May 22, 2024

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.

nikita-leonov avatar nikita-leonov commented on May 22, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.