bugGNUstep - Bugs: bug #43460, The class NSURLConnection needs to...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #43460: The class NSURLConnection needs to be tested more thoroughly

Submitted by:  Sergei Golovin <svg>
Submitted on:  Thu 23 Oct 2014 06:40:07 AM UTC  
 
Category: TestsuiteSeverity: 3 - Normal
Item Group: Change RequestStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Sat 29 Nov 2014 11:57:36 AM UTC, comment #4:

Thanks very much ... I applied that patch to trunk ... looks very good.

Richard Frith-Macdonald <CaS>
Project Member
Fri 28 Nov 2014 04:36:46 AM UTC, comment #3:

The version 2 of the patch is attached with an own simple web server implementation.

(file #32565)

Sergei Golovin <svg>
Fri 31 Oct 2014 10:40:25 AM UTC, comment #2:

OK, I am going to rewrite to avoid any use of libWebServer/libPerformance because the patch's tests don't require all WebServer's capabilities. I choose it only for the reason that someone else (or may be me) needs (will need in the future) to test a more complex test case.

> but if you think a library would be simpler


No, the bundle approach is more preferable for me. I can't remember what exactly was the trouble that prevented me from using a shared library.

Sergei Golovin <svg>
Thu 30 Oct 2014 10:12:53 AM UTC, comment #1:

I really love this patch and the fact that you have produced testcases (they worked nicely for me and helped me check your NSURLProtocol patch).

However, I'm afraid I don't think I can put it in the gnustep-base testsuite as it is.
The reason is that the Helper code depends on libWebServer and libPerformance, but those libraries may not be available ... they certainly aren't available when bootstrapping the system, first time you build base and run the testsuite.

So, I see two possibilities to make it possible to include these tests:
1. add some mechanism to detect whether the libraries are available and only build/run the testcases if they are, or
2. rewrite so that the WebServer library isn't used (ie implement minimal server code as done for the NSURLHandle and NSURL helper).

A side issue ... you have comments saying that you load helper code as a bundle rather than a shared library, because you don't know how to link a library form the Helpers subdirectory. I actually don't see a problem with using a bundle, but if you think a library would be simpler then all you need to do is use the standard gnustep-make mechanism:
Add a line to your GNUmakefile.preamble saying something like
ADDITIONAL_TOOL_LIBS += -L./Helpers -lTestConnection

Richard Frith-Macdonald <CaS>
Project Member
Thu 23 Oct 2014 06:40:07 AM UTC, original submission:

The attached patch is a try to improve the base's test suite in
that direction. It adds the directory Helpers which contains
a bundle of classes helpful for testing (i hope not only of
NSURLConnection). See the file Helpers/README for more information.
It also adds the files test02.m, test03.m, test04.m and test05.m
with tests of NSURLConnection within various contexts.
The current base has a bug which prevents the test03.m from
successful execution. The bug will be reported in another
report.

Sergei Golovin <svg>

 

Attached Files
file #32565:  Test_NSURLConnection_v2.patch.tar.gz added by svg (27KiB - application/gzip)
file #32313:  base-test.patch.tar.gz added by svg (22KiB - application/gzip)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by CaS (Posted a comment)
  • -unavailable- added by svg (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 29 Nov 2014 11:57:36 AM UTCCaSStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Fri 28 Nov 2014 04:36:46 AM UTCsvgAttached File-=>Added Test_NSURLConnection_v2.patch.tar.gz, #32565
    Thu 23 Oct 2014 06:40:07 AM UTCsvgAttached File-=>Added base-test.patch.tar.gz, #32313

    Back to the top


    Powered by Savane 3.1-cleanup1