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

Group
 
 

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

Submitter:  Sergei Golovin <svg>
Submitted:  Thu 23 Oct 2014 06:40:07 AM UTC
   
 
Category:  Testsuite Severity:  3 - Normal
Item Group:  Change Request Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group 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>
Group 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>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

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
  • -email is unavailable- added by CaS (Posted a comment)
  • -email is unavailable- added by svg (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-11-29 CaS StatusNone Fixed
        Open/ClosedOpen Closed
    2014-11-28 svg Attached File- Added Test_NSURLConnection_v2.patch.tar.gz, #32565
    2014-10-23 svg Attached File- Added base-test.patch.tar.gz, #32313

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code