Skip to content

Commit

Permalink
Tweak TCP tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanTAllen committed Aug 23, 2023
1 parent e04e412 commit 9db0bb8
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions packages/net/_test.pony
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ class \nodoc\ _TestTCP is TCPListenNotify
new iso create(h: TestHelper) =>
_h = h

fun iso apply(c: TCPConnectionNotify iso, s: TCPConnectionNotify iso) =>
fun iso apply(c: TCPConnectionNotify iso, s: TCPConnectionNotify iso, port: String) =>
_client_conn_notify = consume c
_server_conn_notify = consume s

Expand All @@ -164,7 +164,7 @@ class \nodoc\ _TestTCP is TCPListenNotify
h.expect_action("client create")
h.expect_action("server accept")

h.dispose_when_done(TCPListener(TCPListenAuth(h.env.root), consume this))
h.dispose_when_done(TCPListener(TCPListenAuth(h.env.root), consume this, "", port))
h.complete_action("server create")

h.long_test(30_000_000_000)
Expand Down Expand Up @@ -209,7 +209,7 @@ class \nodoc\ iso _TestTCPExpect is UnitTest
h.expect_action("server receive")
h.expect_action("expect received")

_TestTCP(h)(_TestTCPExpectNotify(h, false), _TestTCPExpectNotify(h, true))
_TestTCP(h)(_TestTCPExpectNotify(h, false, "60000"), _TestTCPExpectNotify(h, true))

class \nodoc\ iso _TestTCPExpectOverBufferSize is UnitTest
"""
Expand All @@ -225,7 +225,7 @@ class \nodoc\ iso _TestTCPExpectOverBufferSize is UnitTest
h.expect_action("accepted")

_TestTCP(h)(_TestTCPExpectOverBufferSizeNotify(h),
_TestTCPExpectOverBufferSizeNotify(h))
_TestTCPExpectOverBufferSizeNotify(h), "60001")

class \nodoc\ _TestTCPExpectNotify is TCPConnectionNotify
let _h: TestHelper
Expand Down Expand Up @@ -352,7 +352,7 @@ class \nodoc\ iso _TestTCPWritev is UnitTest
h.expect_action("client connect")
h.expect_action("server receive")

_TestTCP(h)(_TestTCPWritevNotifyClient(h), _TestTCPWritevNotifyServer(h))
_TestTCP(h)(_TestTCPWritevNotifyClient(h), _TestTCPWritevNotifyServer(h), "60002")

class \nodoc\ _TestTCPWritevNotifyClient is TCPConnectionNotify
let _h: TestHelper
Expand Down Expand Up @@ -423,7 +423,7 @@ class \nodoc\ iso _TestTCPMute is UnitTest
h.expect_action("sender sent data")

_TestTCP(h)(_TestTCPMuteSendNotify(h),
_TestTCPMuteReceiveNotify(h))
_TestTCPMuteReceiveNotify(h), "60003")

fun timed_out(h: TestHelper) =>
h.complete(true)
Expand Down Expand Up @@ -512,7 +512,7 @@ class \nodoc\ iso _TestTCPUnmute is UnitTest
h.expect_action("sender sent data")

_TestTCP(h)(_TestTCPMuteSendNotify(h),
_TestTCPUnmuteReceiveNotify(h))
_TestTCPUnmuteReceiveNotify(h), "60004")

class \nodoc\ _TestTCPUnmuteReceiveNotify is TCPConnectionNotify
"""
Expand Down Expand Up @@ -569,7 +569,7 @@ class \nodoc\ iso _TestTCPThrottle is UnitTest
h.expect_action("sender throttled")

_TestTCP(h)(_TestTCPThrottleSendNotify(h),
_TestTCPThrottleReceiveNotify(h))
_TestTCPThrottleReceiveNotify(h), "60005")

class \nodoc\ _TestTCPThrottleReceiveNotify is TCPConnectionNotify
"""
Expand Down Expand Up @@ -646,7 +646,7 @@ class \nodoc\ _TestTCPProxy is UnitTest
h.expect_action("sender proxy request")

_TestTCP(h)(_TestTCPProxyNotify(h),
_TestTCPProxyNotify(h))
_TestTCPProxyNotify(h), "60006")

class \nodoc\ _TestTCPProxyNotify is TCPConnectionNotify
let _h: TestHelper
Expand Down

0 comments on commit 9db0bb8

Please sign in to comment.