URLSession tests


(Michael Ferenduros) #1

Hello!
I was looking for a way to contribute, and I ran into a URLSession issue,
so I started fleshing out the test module for it:
https://github.com/mike-ferenduros/swift-corelibs-foundation/blob/more-urlsession-tests/TestFoundation/TestNSURLSession.swift

It doesn't cover all of the API yet, but it does trap a bunch of issues.
But it's my first time contributing to a large, public project so I'm a bit
nervous about ploughing ahead with it... is there any chance someone could
take a quick look and let me know if I'm on the right track, or need to
fundamentally change or scrap it?

Also, I'm not sure about the etiquette of submitting failing tests (of
which there are quite a few :stuck_out_tongue: )


(Pushkar N Kulkarni) #2

Hi Mike,

The tests look great and exhaustive to me. I just wish to mention here that we’ve experienced hangs in CI tests while connecting to some external URLs in the past (you can see a few tests commented out in the current TestNSURLSession for that reason). It was then recommended, by Tony, that we have a loopback server to test URLSession. Having said that, I can’t be sure that the httpbin urls, that you use, will cause the same issues :slight_smile:

Also, it’d be great if you could file JIRA reports/PRs for the failures you see. Thanks!

Pushkar N Kulkarni,

IBM Runtimes

Simplicity is prerequisite for reliability - Edsger W. Dijkstra

Hello!
I was looking for a way to contribute, and I ran into a URLSession issue, so I started fleshing out the test module for it:

https://github.com/mike-ferenduros/swift-corelibs-foundation/blob/more-urlsession-tests/TestFoundation/TestNSURLSession.swift

It doesn’t cover all of the API yet, but it does trap a bunch of issues. But it’s my first time contributing to a large, public project so I’m a bit nervous about ploughing ahead with it… is there any chance someone could take a quick look and let me know if I’m on the right track, or need to fundamentally change or scrap it?

Also, I’m not sure about the etiquette of submitting failing tests (of which there are quite a few :stuck_out_tongue: )

···

swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev

To: swift-corelibs-dev swift-corelibs-dev@swift.org
From: Mike Ferenduros via swift-corelibs-dev
Sent by: swift-corelibs-dev-bounces@swift.org
Date: 09/17/2016 05:34PM
Subject: [swift-corelibs-dev] URLSession tests

-----swift-corelibs-dev-bounces@swift.org wrote: -----


(Michael Ferenduros) #3

Ah yep, I was wondering about relying on external services... will take a
look.

SR 2675-2682 filed, will see if any of them are easy fixes (probably at
least a few are just curl options)

···

On Sat, 17 Sep 2016 at 18:05 Pushkar N Kulkarni <pushkar.nk@in.ibm.com> wrote:

Hi Mike,

The tests look great and exhaustive to me. I just wish to mention here
that we've experienced hangs in CI tests while connecting to some external
URLs in the past (you can see a few tests commented out in the current
TestNSURLSession for that reason). It was then recommended, by Tony, that
we have a loopback server to test URLSession
<https://github.com/apple/swift-corelibs-foundation/pull/613>. Having
said that, I can't be sure that the httpbin urls, that you use, will cause
the same issues :slight_smile:

Also, it'd be great if you could file JIRA reports/PRs for the failures
you see. Thanks!

Pushkar N Kulkarni,
IBM Runtimes

*Simplicity is prerequisite for reliability - Edsger W. Dijkstra*

-----swift-corelibs-dev-bounces@swift.org wrote: -----
To: swift-corelibs-dev <swift-corelibs-dev@swift.org>
From: Mike Ferenduros via swift-corelibs-dev
Sent by: swift-corelibs-dev-bounces@swift.org
Date: 09/17/2016 05:34PM
Subject: [swift-corelibs-dev] URLSession tests

Hello!
I was looking for a way to contribute, and I ran into a URLSession issue,
so I started fleshing out the test module for it:

https://github.com/mike-ferenduros/swift-corelibs-foundation/blob/more-urlsession-tests/TestFoundation/TestNSURLSession.swift

It doesn't cover all of the API yet, but it does trap a bunch of issues.
But it's my first time contributing to a large, public project so I'm a bit
nervous about ploughing ahead with it... is there any chance someone could
take a quick look and let me know if I'm on the right track, or need to
fundamentally change or scrap it?

Also, I'm not sure about the etiquette of submitting failing tests (of
which there are quite a few :stuck_out_tongue: )

_______________________________________________
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev