diff options
author | irungentoo <irungentoo@gmail.com> | 2015-07-02 21:59:52 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2015-07-02 21:59:52 -0400 |
commit | 750201c901697c4c3c44baf2a51c913e990040d6 (patch) | |
tree | 5ece42ba57a68f273a557187605c6ff8651d5101 /auto_tests/TCP_test.c | |
parent | 7a3ca5d4c530e6899ca5127dbe224b94dea3056f (diff) |
Added a couple of checks to test.
Diffstat (limited to 'auto_tests/TCP_test.c')
-rw-r--r-- | auto_tests/TCP_test.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/auto_tests/TCP_test.c b/auto_tests/TCP_test.c index 819892de..ba285971 100644 --- a/auto_tests/TCP_test.c +++ b/auto_tests/TCP_test.c | |||
@@ -566,6 +566,8 @@ START_TEST(test_tcp_connection) | |||
566 | ck_assert_msg(add_tcp_relay_connection(tc_2, connection, ip_port_tcp_s, tcp_s->public_key) == 0, | 566 | ck_assert_msg(add_tcp_relay_connection(tc_2, connection, ip_port_tcp_s, tcp_s->public_key) == 0, |
567 | "Could not add tcp relay to connection\n"); | 567 | "Could not add tcp relay to connection\n"); |
568 | 568 | ||
569 | ck_assert_msg(new_tcp_connection_to(tc_2, tc_1->self_public_key, 123) == -1, "Managed to readd same connection\n"); | ||
570 | |||
569 | c_sleep(50); | 571 | c_sleep(50); |
570 | do_TCP_server(tcp_s); | 572 | do_TCP_server(tcp_s); |
571 | c_sleep(50); | 573 | c_sleep(50); |
@@ -594,6 +596,9 @@ START_TEST(test_tcp_connection) | |||
594 | do_tcp_connections(tc_2); | 596 | do_tcp_connections(tc_2); |
595 | 597 | ||
596 | ck_assert_msg(tcp_data_callback_called, "could not recv packet."); | 598 | ck_assert_msg(tcp_data_callback_called, "could not recv packet."); |
599 | ck_assert_msg(tcp_connection_to_online_tcp_relays(tc_1, 0) == 1, "Wrong number of connected relays"); | ||
600 | ck_assert_msg(kill_tcp_connection_to(tc_1, 0) == 0, "could not kill connection to\n"); | ||
601 | ck_assert_msg(kill_tcp_connection_to(tc_2, 0) == 0, "could not kill connection to\n"); | ||
597 | 602 | ||
598 | kill_TCP_server(tcp_s); | 603 | kill_TCP_server(tcp_s); |
599 | kill_tcp_connections(tc_1); | 604 | kill_tcp_connections(tc_1); |