s4:irpc/tests: explicitly use dcerpc_binding_handle_set_sync_ev()
authorAndrew Bartlett <abartlet@samba.org>
Mon, 5 May 2014 04:27:59 +0000 (16:27 +1200)
committerStefan Metzmacher <metze@samba.org>
Mon, 12 May 2014 22:08:12 +0000 (00:08 +0200)
This indicates that we're using nested event loops...

Andrew Bartlett

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Change-Id: I17d530a1f338cfdbd2e4e755b6f01a44a3e7ba7a
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
source4/lib/messaging/tests/irpc.c

index d78dc784920ffb9b56b8a2d923c286a1d58648cf..486420b50dd3660c1c37a585d3861f43bc735998 100644 (file)
@@ -102,6 +102,11 @@ static bool test_addone(struct torture_context *test, const void *_data,
        r.in.in_data = value;
 
        test_debug = true;
+       /*
+        * Note: this makes use of nested event loops
+        * as client and server use the same loop.
+        */
+       dcerpc_binding_handle_set_sync_ev(irpc_handle, data->ev);
        status = dcerpc_echo_AddOne_r(irpc_handle, test, &r);
        test_debug = false;
        torture_assert_ntstatus_ok(test, status, "AddOne failed");
@@ -136,6 +141,11 @@ static bool test_echodata(struct torture_context *tctx,
        r.in.in_data = (unsigned char *)talloc_strdup(mem_ctx, "0123456789");
        r.in.len = strlen((char *)r.in.in_data);
 
+       /*
+        * Note: this makes use of nested event loops
+        * as client and server use the same loop.
+        */
+       dcerpc_binding_handle_set_sync_ev(irpc_handle, data->ev);
        status = dcerpc_echo_EchoData_r(irpc_handle, mem_ctx, &r);
        torture_assert_ntstatus_ok(tctx, status, "EchoData failed");