diff options
Diffstat (limited to 'tests/sender-receiver.c')
-rw-r--r-- | tests/sender-receiver.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/sender-receiver.c b/tests/sender-receiver.c index 9c47ac3..ca6e816 100644 --- a/tests/sender-receiver.c +++ b/tests/sender-receiver.c @@ -168,10 +168,22 @@ test_icipc_sender_lost_connection () icipc_receiver_free (r); wait_for_event (&data, 1); + /* make sure the connection was lost */ + g_assert_false (icipc_sender_is_connected (s)); + + /* create a new receiver */ + struct icipc_receiver *r2 = icipc_receiver_new (TEST_ADDRESS, 16, NULL, NULL, 0); + g_assert_nonnull (r2); + + /* re-connect sender with new receiver */ + g_assert_true (icipc_sender_connect (s)); + g_assert_true (icipc_sender_is_connected (s)); + /* clean up */ g_cond_clear (&data.cond); g_mutex_clear (&data.mutex); icipc_sender_free (s); + icipc_receiver_free (r2); } static void |