The Trunk: SqueakSSL-Tests-pre.21.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: SqueakSSL-Tests-pre.21.mcz

commits-2
Patrick Rein uploaded a new version of SqueakSSL-Tests to project The Trunk:
http://source.squeak.org/trunk/SqueakSSL-Tests-pre.21.mcz

==================== Summary ====================

Name: SqueakSSL-Tests-pre.21
Author: pre
Time: 16 August 2016, 10:32:07.633215 pm
UUID: 9db75c50-3149-0740-bb7e-7bbc76c2512e
Ancestors: SqueakSSL-Tests-pre.20

Adds timeouts to SSLTests for running the tests with slow internet connections.

=============== Diff against SqueakSSL-Tests-pre.20 ===============

Item was changed:
  ----- Method: SqueakSSLTest>>testFaceBookAPI (in category 'tests') -----
  testFaceBookAPI
  "Facebook sends incomplete data during SSL handshake.
  Useful for testing an edge condition in SqueakSSL."
 
+ self
+ timeout: 60;
+ ensureInternetConnectionTo: 'http://www.facebook.com'.
- self ensureInternetConnectionTo: 'http://www.facebook.com'.
 
  Smalltalk at: #WebClient ifPresent:[:webClient|
  self shouldnt:[
  [webClient httpGet: 'https://graph.facebook.com/oauth/access_token']
  "Allow certificate errors on the Mac since cert validation isn't
  implemented yet."
  on: SqueakSSLCertificateError do:[:ex|
  SqueakSSL platformName = 'Mac OS'
  ifTrue:[ex resume]
  ifFalse:[ex pass]].
  ] raise: Error.
  ]..
  !

Item was changed:
  ----- Method: SqueakSSLTest>>testGooglePopStream (in category 'tests') -----
  testGooglePopStream
  "This tests the dreaded data-in-last-handshake problem that some people
  have been seeing. Google mail (at times) sends the first data chunk together
  with the last handshake and the Windows SSL code did not handle that correctly"
 
  "self run: #testGooglePopStream"
  | hostName address socket response stream |
+ self timeout: 60.
  hostName := 'pop.gmail.com'.
  address := NetNameResolver addressForName: hostName.
  socket := Socket newTCP.
  socket connectTo: address port: 995.
  socket waitForConnectionFor: 10.
  stream := self secureSocketStream on: socket.
  [
  stream sslConnect.
  response := stream upToAll: String crlf.
  self assert: response notEmpty.
  ] ensure:[stream destroy].
  !