Skip to content

Commit 6244a53

Browse files
committed
170: Rewrite testFailedAcceptOnAlternateLocalhost as testFailedConnect. Testing a failed connect is really the intention of the test.
testFailedAcceptOnAlternateLocalhost failed on macOS since it could not bind to the alternate localhost address.
1 parent 57e3967 commit 6244a53

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

src/RemoteServiceReplication-Test/RsrConnectionSpecificationTestCase.class.st

+3-12
Original file line numberDiff line numberDiff line change
@@ -260,24 +260,15 @@ RsrConnectionSpecificationTestCase >> testEstablishConnection [
260260
]
261261

262262
{ #category : 'running' }
263-
RsrConnectionSpecificationTestCase >> testFailedAcceptOnAlternativeLocalhost [
263+
RsrConnectionSpecificationTestCase >> testFailedConnect [
264264

265-
| acceptor initiator semaphore |
266-
acceptor := RsrAcceptConnection
267-
host: self alternativeLocalhost
268-
port: self port.
265+
| initiator |
269266
initiator := RsrInitiateConnection
270267
host: self localhost
271268
port: self port.
272-
semaphore := Semaphore new.
273-
RsrProcessModel
274-
fork: [[semaphore signal. acceptor waitForConnection] on: RsrWaitForConnectionCancelled do: [:ex | ex return]]
275-
named: 'Pending WaitForConnectionCancelled'.
276-
[semaphore wait.
277269
self
278270
should: [initiator connect]
279-
raise: RsrSocketError]
280-
ensure: [acceptor cancelWaitForConnection]
271+
raise: RsrSocketError
281272
]
282273

283274
{ #category : 'running' }

0 commit comments

Comments
 (0)