Skip to content

Commit

Permalink
lib-imap-client: Fixes to unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
sirainen committed Apr 10, 2017
1 parent bac4b1d commit a2328a1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/lib-imap-client/test-imapc-client.c
Expand Up @@ -144,7 +144,8 @@ static void test_run_client_server(
i_debug("server: PID=%s", my_pid);
/* child: server */
ioloop = io_loop_create();
server_test();
if (server_test != NULL)
server_test();
test_server_disconnect(&server);
io_loop_destroy(&ioloop);
/* wait for it to be killed; this way, valgrind will not
Expand Down Expand Up @@ -374,7 +375,7 @@ static void test_imapc_reconnect_server(void)
test_assert(test_imapc_server_expect("3 NOOP"));
o_stream_nsend_str(server.output, "3 OK \r\n");

test_assert(test_imapc_server_expect("4 LOGOUT"));
test_assert(i_stream_read_next_line(server.input) == NULL);
}

static void test_imapc_reconnect(void)
Expand Down Expand Up @@ -438,7 +439,7 @@ static void test_imapc_reconnect_resend_cmds_server(void)
test_assert(test_imapc_server_expect("3 RETRY2"));
o_stream_nsend_str(server.output, "3 OK \r\n");

test_assert(test_imapc_server_expect("4 LOGOUT"));
test_assert(i_stream_read_next_line(server.input) == NULL);
}

static void test_imapc_reconnect_resend_commands(void)
Expand Down Expand Up @@ -568,9 +569,8 @@ static void test_imapc_reconnect_mailbox_server(void)
o_stream_nsend_str(server.output, "6 OK \r\n");
test_assert(test_imapc_server_expect("3 RETRY"));
o_stream_nsend_str(server.output, "3 OK \r\n");
i_info("retry");

test_assert(test_imapc_server_expect("4 LOGOUT"));
test_assert(i_stream_read_next_line(server.input) == NULL);
}

static void test_imapc_reconnect_mailbox(void)
Expand Down

0 comments on commit a2328a1

Please sign in to comment.