summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-04-23 12:31:12 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:51:32 -0500
commitf66bd1ae54c2d69b84790f4a2a860d4a3c65873e (patch)
tree3d5caad1872cc93d999197136021e41347664248 /source4/torture
parentd7b01752491b0cd4389d1f29f1a17c1ab4394357 (diff)
downloadsamba-f66bd1ae54c2d69b84790f4a2a860d4a3c65873e.tar.gz
samba-f66bd1ae54c2d69b84790f4a2a860d4a3c65873e.tar.bz2
samba-f66bd1ae54c2d69b84790f4a2a860d4a3c65873e.zip
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)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/rpc/echo.c9
1 files changed, 7 insertions, 2 deletions
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");