From f66bd1ae54c2d69b84790f4a2a860d4a3c65873e Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 23 Apr 2007 12:31:12 +0000 Subject: r22486: add a flag to ignore timeouts of a request and don't close the connection on timeout metze (This used to be commit 6b23ab1fd265e2a92456701fb02bd1838c098874) --- source4/torture/rpc/echo.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'source4/torture/rpc') diff --git a/source4/torture/rpc/echo.c b/source4/torture/rpc/echo.c index f2a40912e6..21f8eed00d 100644 --- a/source4/torture/rpc/echo.c +++ b/source4/torture/rpc/echo.c @@ -388,8 +388,12 @@ static bool test_timeout(struct torture_context *tctx, r.in.seconds = 2; p->request_timeout = 1; - torture_assert(tctx, req = dcerpc_echo_TestSleep_send(p, tctx, &r), - "Failed to send async sleep request"); + req = dcerpc_echo_TestSleep_send(p, tctx, &r); + if (!req) { + torture_comment(tctx, "Failed to send async sleep request\n"); + goto failed; + } + req->ignore_timeout = True; status = dcerpc_ndr_request_recv(req); torture_assert_ntstatus_equal(tctx, status, NT_STATUS_IO_TIMEOUT, @@ -408,6 +412,7 @@ static bool test_timeout(struct torture_context *tctx, torture_comment(tctx, "Failed to send async sleep request\n"); goto failed; } + req->ignore_timeout = True; status = dcerpc_ndr_request_recv(req); torture_assert_ntstatus_equal(tctx, status, NT_STATUS_IO_TIMEOUT, "request should have timed out"); -- cgit