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

[SR-1872] Use runloop source in XCTestCase.waitForExpectations(withTimeout:file:line:handler:) #384

Open
modocache mannequin opened this issue Jun 22, 2016 · 6 comments

Comments

@modocache
Copy link
Mannequin

@modocache modocache mannequin commented Jun 22, 2016

Previous ID SR-1872
Radar None
Original Reporter @modocache
Type Improvement
Status In Progress
Resolution
Additional Detail from JIRA
Votes 0
Component/s XCTest
Labels Improvement, StarterBug
Assignee pranavShenoy95 (JIRA)
Priority Medium

md5: 2f80d90c1c1340fe3c193450551b82f7

Issue Description:

See this FIXME:

"Instead of polling the expectations to check whether they've been fulfilled, it would be more efficient to use a runloop source that can be signaled to wake up when an expectation is fulfilled."

Prerequisites:

  • A development environment capable of building Swift from source.

Helpful skills:
Familiarity with Swift, XCTest, and Foundation's NSRunLoop.

Starting point:

  1. Build Swift from source by following the instructions in the Swift README.

  2. Build and run the swift-corelibs-xctest tests by following the instructions in the swift-corelibs-xctest README. Confirm that all the tests pass.

  3. Modify the source code in XCTestCase+Asynchronous.swift to use a runloop source. The Apple documentation on run loops might be helpful.

  4. Run the swift-corelibs-xctest tests again. Confirm they all still pass. If they do, send a pull request!

@belkadan
Copy link

@belkadan belkadan commented Jul 27, 2019

Resetting assignee on all Starter Bugs not modified since 2018.

@swift-ci
Copy link

@swift-ci swift-ci commented Aug 2, 2019

Comment by Kazuhiro Hayashi (JIRA)

Has someone already fixed this issue? I want to try. 🙂

@swift-ci
Copy link

@swift-ci swift-ci commented Aug 2, 2019

Comment by Kazuhiro Hayashi (JIRA)

This issue has been fixed by the following commit?

ffa81a2#diff-3bcbfe3df724d74e85b7c115710eaa7aR370

@belkadan
Copy link

@belkadan belkadan commented Aug 2, 2019

@stmontgomery
Copy link
Contributor

@stmontgomery stmontgomery commented Aug 29, 2019

kazuhiro4949 (JIRA User) No I don't believe that PR addressed this, so it's still outstanding. Feel free to submit a PR!

@swift-ci
Copy link

@swift-ci swift-ci commented Aug 7, 2020

Comment by pranav (JIRA)

@stmontgomery @belkadan @modocache Could you please help me in merging the pull request for the task? This pull request has been blocked for a while due to a dependency in Foundation framework (in wrappers for CFRunloopContext). I have root caused the issue (crash) but not sure about the best solution.

Please help me in merging this pull request. Thanks.

Link to pull request: #304

cc: @millenomi @compnerd

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants