[squeak-dev] The Trunk: NetworkTests-dtl.33.mcz

Frank Shearar frank.shearar at gmail.com
Sat Nov 3 20:00:22 UTC 2012


On 3 November 2012 18:26, David T. Lewis <lewis at mail.msen.com> wrote:
> This should get us to either 4 or 5 remaining test failures on the squeakci.org
> tests, depending on VM. I'll note for the record that SocketTest>>testSocketReuse

Yep, confirmed. Thanks!

> fails on my computer at home (SuSE Linux), but passes on squeakci.org. I presume
> this is due to another platform difference, but it's not showing up on the radar
> for our Squeak 4.4 release preparation so I'm not going to worry about it right now.

Agreed: we can figure out how to isolate ourselves from platforms (or
expose the differences more clearly) in another release. I'd like to
get 4.4 out the door!

frank

> Dave
>
>
> On Sat, Nov 03, 2012 at 06:17:47PM +0000, commits at source.squeak.org wrote:
>> David T. Lewis uploaded a new version of NetworkTests to project The Trunk:
>> http://source.squeak.org/trunk/NetworkTests-dtl.33.mcz
>>
>> ==================== Summary ====================
>>
>> Name: NetworkTests-dtl.33
>> Author: dtl
>> Time: 3 November 2012, 2:17:02.043 pm
>> UUID: 3071c11f-8cef-43a2-b1b8-88c573ef9daf
>> Ancestors: NetworkTests-ul.32
>>
>> Fix SocketTest>>testSendTimeout to accommodate platform differences.
>>
>> Explanation: #sendDone means that the platform is reporting a send operation complete. The platform may or may not be able to accept addition write requests while sending is in process, depending on the buffering capability of the underlying platform. On Windows, the next write request fails immediately if a prior send is not complete, while unix platforms may be able to accept and buffer additional writes. Therefore change the test to expect a timeout exception to eventually occur, but not necessary on the next write operation.
>>
>> =============== Diff against NetworkTests-ul.32 ===============
>>
>> Item was changed:
>>   ----- Method: SocketTest>>testSendTimeout (in category 'tests') -----
>>   testSendTimeout
>>       "Test data transfer and related methods"
>>
>> +     | buffer ex |
>> -     | buffer |
>>       self testServerAccept.
>>       buffer := ByteArray new: 1000.
>> +
>> +     "Write to the socket until the platform reports that sending is not complete."
>>       [serverSocket sendDone] whileTrue:[
>>               serverSocket sendSomeData: buffer.
>>       ].
>> +
>> +     "The network layer is now either blocked or in the process of sending data in its buffers.
>> +     It may or may not be able buffer additional write requests, depending on the platform
>> +     implemention. Keep sending data until the network reports that it is unable to process
>> +     the request, at which time a exception will be raised. On Windows, the exception will
>> +     be raised on the next write request, while unix platforms may provide additional buffering
>> +     that permit write requests to continue being accepted."
>> +     ex := nil.
>> +     [[serverSocket sendSomeData: buffer startIndex: 1 count: buffer size for: 1]
>> +             on: ConnectionTimedOut
>> +             do: [ :e | ex := e ].
>> +     ex isNil] whileTrue: [].
>> +     self assert: ex notNil.
>> -     self should:[serverSocket sendSomeData: buffer startIndex: 1 count: buffer size for: 1]
>> -             raise: ConnectionTimedOut.
>>   !
>>
>


More information about the Squeak-dev mailing list