Skip to content

Commit

Permalink
Skip SocketStreamTest>>testFlushLargeMessageOtherEndClosed on Windows
Browse files Browse the repository at this point in the history
Fails due to Windows accepting arbitrarily large messages--much larger than the TCP send buffer--in a single send(2) call, preventing #waitForSendDone... from being called during the send process. Not sure why but this is not a regression, just strange behavior revealed by the new test.
  • Loading branch information
daniels220 committed Apr 16, 2024
1 parent 2fa9b43 commit 1ff5eb1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Network-Tests/SocketStreamTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,18 @@ SocketStreamTest >> tearDown [

{ #category : 'stream protocol' }
SocketStreamTest >> testFlushLargeMessageOtherEndClosed [
"A large send will be broken into chunks and fail once the TCP send buffer
"A large send should be broken into chunks and fail once the TCP send buffer
is full. Ensure we actually exceed the size of the send buffer, but also try
to reduce it first so we don't need an excessively large message. Some platforms
(Linux) have minimum values for this setting that prevent us from relying on
lowering it alone. Attempt to set a 65KiB buffer and double whatever we get."

| bufferSize |
"Windows seems to accept arbitrarily large send() payloads regardless of the
send buffer size, so we can't force a wait other than by calling #flush twice,
which would defeat the whole purpose of the test.
Skip on Windows for now as this is not a regression."
OSPlatform current isWindows ifTrue: [ self skip ].
clientStream socket setOption: 'SO_SNDBUF' value: 2 ** 16.
bufferSize := (clientStream socket getOption: 'SO_SNDBUF') second.
serverStream close.
Expand Down

0 comments on commit 1ff5eb1

Please sign in to comment.