Eliot Miranda uploaded a new version of NetworkTests to project The Trunk:
http://source.squeak.org/trunk/NetworkTests-eem.59.mcz==================== Summary ====================
Name: NetworkTests-eem.59
Author: eem
Time: 25 September 2020, 1:20:02.115435 pm
UUID: 6c005829-7edf-4318-bbb9-bf452903461a
Ancestors: NetworkTests-pre.58
SocketTest: use teh facilities in Network-eem.242 to use the crrect address family when looking up a name for a socket to connect/accept to. Hence get rid of the
sqConnectToAddressSize: Address family not supported by protocol family
error message from the SocketPlugin when running the SocketTest tests.
=============== Diff against NetworkTests-pre.58 ===============
Item was added:
+ ----- Method: SocketTest>>listenerAddressForFamily: (in category 'fixtures') -----
+ listenerAddressForFamily: addressFamily
+ ^NetNameResolver addressForName: 'localhost' family: addressFamily!
Item was changed:
----- Method: SocketTest>>testClientConnect (in category 'tests') -----
testClientConnect
"Tests a client socket connection"
clientSocket := Socket newTCP.
+ clientSocket connectTo: (self listenerAddressForFamily: clientSocket addressFamily) port: self listenerPort.
- clientSocket connectTo: self listenerAddress port: self listenerPort.
clientSocket waitForConnectionFor: 2.
+ self assert: clientSocket isConnected!
- self assert: clientSocket isConnected.
- !
Item was changed:
----- Method: SocketTest>>testLocalAddress (in category 'tests') -----
testLocalAddress
"Tests the various localAddress values for sockets"
self testServerAccept.
+ self assert: listenerSocket localAddress equals: (self listenerAddressForFamily: listenerSocket addressFamily).
+ self assert: clientSocket localAddress equals: (self listenerAddressForFamily: clientSocket addressFamily).
+ self assert: serverSocket localAddress equals: (self listenerAddressForFamily: serverSocket addressFamily)!
- self assert: listenerSocket localAddress = self listenerAddress.
- self assert: clientSocket localAddress = self listenerAddress.
- self assert: serverSocket localAddress = self listenerAddress.
- !