<font face="Verdana,Arial,Helvetica,sans-serif" size="2"><div style="font-size: small;"><font face="Default Sans Serif, Verdana, Arial, Helvetica, sans-serif">Hi Peter, </font></div><div style="font-size: small;"><font face="Default Sans Serif, Verdana, Arial, Helvetica, sans-serif"><br></font></div><div><font><font face="Sans Serif, Verdana, Arial, Helvetica, sans-serif" size="2">I'll try to </font><font size="2" face="Default Sans Serif, Verdana, Arial, Helvetica, sans-serif">answer your questions to some extent!</font></font></div><div><br></div><div style="font-size: small; font-family: Verdana, Arial, Helvetica, sans-serif;"><div class="" style="font-family: 'Default Sans Serif', Verdana, Arial, Helvetica, sans-serif;"><i><br class=""></i></div><div class="" style="font-family: 'Default Sans Serif', Verdana, Arial, Helvetica, sans-serif;"><i>I’m wondering if anyone has any info on what happened with the (rather more elaborate) “loopback” server and set of tests from @danieleggert’s PR #299:</i></div><div class="" style="font-family: 'Default Sans Serif', Verdana, Arial, Helvetica, sans-serif;"><i><br class=""></i></div><div class="" style="font-family: 'Default Sans Serif', Verdana, Arial, Helvetica, sans-serif;"><a href="https://github.com/apple/swift-corelibs-foundation/pull/299" class=""><i>https://github.com/apple/swift-corelibs-foundation/pull/299</i></a></div><div class="" style="font-family: 'Default Sans Serif', Verdana, Arial, Helvetica, sans-serif;"><i><br class=""></i></div><div class="" style="font-family: 'Default Sans Serif', Verdana, Arial, Helvetica, sans-serif;"><i>Is there some reason we ended up with a somewhat cut-down version of those (I understand that perhaps the URLSession implementation itself from this PR was not used, but perhaps we could pull some of the tests forward, or the more flexible loopback implementation) in master? Sorry if this is a silly question — I’m not very well-versed in the more low-level networking stuff involved here so there may be some obvious reason these are not suitable that I am missing.</i></div><div class="" style="font-family: 'Default Sans Serif', Verdana, Arial, Helvetica, sans-serif;"><br></div><div class="" style="font-family: 'Default Sans Serif', Verdana, Arial, Helvetica, sans-serif;">>> Yes, PR 299 from Daniel Eggert had a much mature loopback server and a better test coverage. However, it used functionality from the internal classes in the NSURLSession package (HTTPBodySource and friends), for which we needed to used a <a target="_blank" href="https://github.com/apple/swift-corelibs-foundation/pull/299/files#diff-aec4665d7562834babd21b66fa84ee45R20" title="https://github.com/apple/swift-corelibs-foundation/pull/299/files#diff-aec4665d7562834babd21b66fa84ee45R20">@testable import </a>in TestFoundation. If I remember our discussions right, to support a `@testable import` you'd need to do build Foundation with the `-enable-testing` flag, which may not acceptable for Release builds. Of course, there was the possibility of rewriting this functionality (from the internal classes) all over again. But we decided to start with a simple loopback server and then build on it. </div><div class="" style="font-family: 'Default Sans Serif', Verdana, Arial, Helvetica, sans-serif;"><br class=""></div><div class="" style="font-family: 'Default Sans Serif', Verdana, Arial, Helvetica, sans-serif;"><br></div><div class="" style="font-family: 'Default Sans Serif', Verdana, Arial, Helvetica, sans-serif;"><br></div><div class="" style="font-family: 'Default Sans Serif', Verdana, Arial, Helvetica, sans-serif;"><br></div><div class="" style="font-family: 'Default Sans Serif', Verdana, Arial, Helvetica, sans-serif;"><i>Mailing list user Mike Ferenduros also put together what to my eye are some pretty comprehensive tests that have not ever seemed to be PR’d or merged, described here:</i></div><div class="" style="font-family: 'Default Sans Serif', Verdana, Arial, Helvetica, sans-serif;"><a href="https://lists.swift.org/pipermail/swift-corelibs-dev/Week-of-Mon-20160912/000943.html" class=""><i>https://lists.swift.org/pipermail/swift-corelibs-dev/Week-of-Mon-20160912/000943.html</i></a></div><div class="" style="font-family: 'Default Sans Serif', Verdana, Arial, Helvetica, sans-serif;"><br></div><div class="" style="font-family: 'Default Sans Serif', Verdana, Arial, Helvetica, sans-serif;"><i>>> </i>Yes, I am aware of the extensive tests Mike Ferenduros has written. In my opinion, it will be great to have them contributed once we have a more mature loopback server infrastructure. Mike has also opened a dozen URLSession bugs!</div><div class="" style="font-family: 'Default Sans Serif', Verdana, Arial, Helvetica, sans-serif;"><br></div><div class="" style="font-family: 'Default Sans Serif', Verdana, Arial, Helvetica, sans-serif;"><br></div><div class="" style="font-family: 'Default Sans Serif', Verdana, Arial, Helvetica, sans-serif;"><br></div><div class="" style="font-family: 'Default Sans Serif', Verdana, Arial, Helvetica, sans-serif;"><i>Seems like there was some concern over the use of <a href="http://httpbin.org" class="">httpbin.org</a>, but these could be perhaps pulled in and simply redirected to hit the loopback, as the rest seems pretty well thought-out.</i></div><div class="" style="font-family: 'Default Sans Serif', Verdana, Arial, Helvetica, sans-serif;">>> The problem we have had with external URLs is the delays and intermittent failures which keep breaking the CI builds, causing much agony to many! Can you tell me more about this solution you propose?</div><div class="" style="font-family: 'Default Sans Serif', Verdana, Arial, Helvetica, sans-serif;"><br></div><div class="" style="font-family: 'Default Sans Serif', Verdana, Arial, Helvetica, sans-serif;"><br></div><div class="" style="font-family: 'Default Sans Serif', Verdana, Arial, Helvetica, sans-serif;"><br></div><div class="" style="font-family: 'Default Sans Serif', Verdana, Arial, Helvetica, sans-serif;">Thanks!</div><font face="Verdana,Arial,Helvetica,sans-serif" size="2"><font><font><div class="socmaildefaultfont" dir="ltr"><div class="socmaildefaultfont" dir="ltr"><div class="socmaildefaultfont" dir="ltr"><div dir="ltr" style="font-style: normal;"><br><font face="Sans Serif, Verdana, Arial, Helvetica, sans-serif">Pushkar N Kulkarni,</font></div>
<div dir="ltr" style="font-style: normal;"><font face="Sans Serif, Verdana, Arial, Helvetica, sans-serif">IBM Runtimes</font></div><div dir="ltr" style="font-style: normal;"><font face="Sans Serif, Verdana, Arial, Helvetica, sans-serif"><br></font></div><div dir="ltr"><font face="serif, Times New Roman, Times, serif"><i>Simplicity is prerequisite for reliability - Edsger W. Dijkstra</i></font></div>
<div dir="ltr" style="font-style: normal; font-size: 10.5pt; font-family: Arial;"><br></div></div></div></div></font></font></font></div><br><br><font face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size="2" color="#000000" style="font-size: small; font-family: Verdana, Arial, Helvetica, sans-serif;"><font color="#990099"><a href="mailto:-----swift-corelibs-dev-bounces@swift.org" target="_blank">-----swift-corelibs-dev-bounces@swift.org</a> wrote: -----</font><div class="iNotesHistory" style="padding-left:5px;"><div style="padding-right:0px;padding-left:5px;border-left:solid black 2px;">To: swift-corelibs-dev <<a href="mailto:swift-corelibs-dev@swift.org" target="_blank">swift-corelibs-dev@swift.org</a>><br>From: Peter Tomaselli via swift-corelibs-dev <swift-corelibs-dev@swift.org><br>Sent by: <a href="mailto:swift-corelibs-dev-bounces@swift.org" target="_blank">swift-corelibs-dev-bounces@swift.org</a><br>Date: 02/03/2017 08:11AM<br>Subject: Re: [swift-corelibs-dev] URLSession test fest!<br><br><!--Notes ACF
<meta http-equiv="Content-Type" content="text/html charset=utf8">-->Following up on this…<div class=""><br class=""></div><div class="">I’m wondering if anyone has any info on what happened with the (rather more elaborate) “loopback” server and set of tests from @danieleggert’s PR #299:</div><div class=""><br class=""></div><div class=""><a href="https://github.com/apple/swift-corelibs-foundation/pull/299" class="">https://github.com/apple/swift-corelibs-foundation/pull/299</a></div><div class=""><br class=""></div><div class="">Is there some reason we ended up with a somewhat cut-down version of those (I understand that perhaps the URLSession implementation itself from this PR was not used, but perhaps we could pull some of the tests forward, or the more flexible loopback implementation) in master? Sorry if this is a silly question — I’m not very well-versed in the more low-level networking stuff involved here so there may be some obvious reason these are not suitable that I am missing.</div><div class=""><br class=""></div><div class="">Mailing list user Mike Ferenduros also put together what to my eye are some pretty comprehensive tests that have not ever seemed to be PR’d or merged, described here:</div><div class=""><br class=""></div><div class=""><a href="https://lists.swift.org/pipermail/swift-corelibs-dev/Week-of-Mon-20160912/000943.html" class="">https://lists.swift.org/pipermail/swift-corelibs-dev/Week-of-Mon-20160912/000943.html</a></div><div class=""><br class=""></div><div class="">Seems like there was some concern over the use of <a href="http://httpbin.org" class="">httpbin.org</a>, but these could be perhaps pulled in and simply redirected to hit the loopback, as the rest seems pretty well thought-out.</div><div class=""><br class=""></div><div class="">Just wondering if anyone has any of the background information here. I started writing some tests and loopback enhancements of my own but these other two gentlemen are way ahead of me, so maybe we should grab what we can from them, if it is possible to do so! Happy to take a crack at that if it seems like a sane idea.</div><div class=""><br class=""></div><div class="">Cheers,</div><div class=""><br class=""></div><div class="">Peter</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 31, 2017, at 8:45 AM, Peter Tomaselli <<a href="mailto:vast.grapes@gmail.com" class="">vast.grapes@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Rad, thanks Tony. I can run all the tests now. Hoping to have some time soon to dig in and see if I can make a contribution. Love that this thing is spinning up its own HTTP server for this — seems real fun.<br class=""><br class="">Cheers,<br class=""><br class="">Peter<br class=""><br class=""><blockquote type="cite" class="">On Jan 30, 2017, at 5:46 PM, Tony Parker <<a href="mailto:anthony.parker@apple.com" class="">anthony.parker@apple.com</a>> wrote:<br class=""><br class="">I see what this problem is. I’ll have a PR up shortly to fix it.<br class=""><br class="">- Tony<br class=""></blockquote><br class=""></div></div></blockquote></div><br class=""></div><div><font face="Courier New,Courier,monospace" size="3">_______________________________________________<br>swift-corelibs-dev mailing list<br><a href="mailto:swift-corelibs-dev@swift.org" target="_blank">swift-corelibs-dev@swift.org</a><br><a href="https://lists.swift.org/mailman/listinfo/swift-corelibs-dev">https://lists.swift.org/mailman/listinfo/swift-corelibs-dev</a><br></font></div></swift-corelibs-dev@swift.org></div></div></font></font><BR>