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

Added expectations to server request test cases #349

Merged
merged 5 commits into from Apr 12, 2016
Merged

Added expectations to server request test cases #349

merged 5 commits into from Apr 12, 2016

Conversation

naithar
Copy link
Contributor

@naithar naithar commented Apr 7, 2016

Description

Added XCTestExpectation to request handler. Changed how server tests is waiting for requests to finish.

Motivation and Context

#86

How Has This Been Tested?

Checklist:

  • I have submitted a CLA form
  • If applicable, I have updated the documentation accordingly.
  • [] If applicable, I have added tests to cover my changes.

@dfirsht
Copy link
Contributor

dfirsht commented Apr 7, 2016

You'll need this to pass on Linux as well. Check out this PR for the API for expectations on Linux: apple/swift-corelibs-xctest#43. You can use #if os(Linux) to run system dependent code.

@naithar
Copy link
Contributor Author

naithar commented Apr 7, 2016

This one fixed it. It's actually sort of strange to see different API for the same library.

@dfirsht
Copy link
Contributor

dfirsht commented Apr 12, 2016

This is great! Everything is working fine. We can merge this is in right now.

@dfirsht dfirsht merged commit 7864d99 into Kitura:develop Apr 12, 2016
@modocache
Copy link

It's actually sort of strange to see different API for the same library.

To clarify a bit here: swift-corelibs-xctest provides an API that matches the Swift 3 import rules for Objective-C. You're seeing two different APIs because the version of Swift you use on OS X is a version lower than 3.

Once you've updated to Swift 3 (I assume you're waiting for an official Swift 3 release, which I think is a good idea), you'll be able to use the exact same API across all platforms. In the meantime, sorry for the inconvenience!

I wonder if we can provide both APIs in the meantime, to make it easier for people working with corelibs-xctest now? /cc @mike-ferris-apple @briancroom

@modocache
Copy link

I created SR-1215 to track this issue. Thanks! Also, feel free to ping me or create a JIRA task for any other feedback you have on swift-corelibs-xctest. 👍

@briancroom
Copy link

@modocache It looks to me like the issue here isn't actually trying to support Swift 2.2 and 3, but rather that the most recent Swift development snapshot doesn't include the corelibs-xctest changes (from apple/swift-corelibs-xctest#88) required to make its API match the Swift 3 import rules. So this PR needed to use the Swift 2.2 API on Linux and the 3 API on Darwin. Once the next snapshot goes live, things should be unified again.

That being said, there may still be a case for corelibs-xctest exposing an API compatible with the 2.2 naming, but I would want to see a concrete case needing it, and this isn't it, I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants