Patrick Rein uploaded a new version of WebClient-Tests to project The Trunk:
http://source.squeak.org/trunk/WebClient-Tests-pre.56.mcz==================== Summary ====================
Name: WebClient-Tests-pre.56
Author: pre
Time: 12 October 2018, 12:59:15.730185 pm
UUID: 673190f3-1e30-1b49-ba25-cbcf8ce1ef91
Ancestors: WebClient-Tests-topa.55
Fixes two timing-related test failures which did not indicate actually missing functionality.
=============== Diff against WebClient-Tests-topa.55 ===============
Item was changed:
----- Method: WebClientServerTest>>testLogging200 (in category 'tests - misc') -----
testLogging200
"Test logging a regular 200 a-ok response"
| resp client log |
server addService: '/test' action:[:req | req send200Response: 'ok'].
server accessLog: String new writeStream.
client := WebClient new.
client accessLog: String new writeStream.
+ [resp := client httpGet: self localHostUrl, '/test'] ensure: [client close].
+ 1 seconds wait.
- [resp := client httpGet: self localHostUrl, '/test'] ensure:[client close].
-
self assert: resp code = 200.
log := server accessLog contents.
self assert: ('127.0.0.1 - - [*] "GET /test HTTP/1.1" 200 2', String cr match: log).
log := client accessLog contents.
self assert: ('localhost - - [*] "GET /test HTTP/1.1" 200 2', String cr match: log).
!
Item was changed:
----- Method: WebClientServerTest>>testLogging404 (in category 'tests - misc') -----
testLogging404
"Test logging a 404 response"
| resp client log |
server accessLog: String new writeStream.
client := WebClient new.
client accessLog: String new writeStream.
+ [resp := client httpGet: self localHostUrl] ensure: [client close].
+ 1 seconds wait.
- [resp := client httpGet: self localHostUrl] ensure:[client close].
-
self assert: resp code = 404.
log := server accessLog contents.
self assert: ('127.0.0.1 - - [*] "GET / HTTP/1.1" 404 145', String cr match: log).
log := client accessLog contents.
self assert: ('localhost - - [*] "GET / HTTP/1.1" 404 145', String cr match: log).
!