Skip to content

Commit

Permalink
test: remove blinding from unit tests (#4281)
Browse files Browse the repository at this point in the history
The self_talk_session_id test triggers blinding, which makes the test very slow. It requires about 40 seconds to run. This commit sets the blinding to "self-service" which allows the test to run in about 4 seconds.
  • Loading branch information
jmayclin authored Nov 10, 2023
1 parent db07a3d commit 1b9b1d6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/unit/s2n_self_talk_session_id_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ void mock_client(struct s2n_test_io_pair *io_pair)

/* Session resumption with bad session state */
conn = s2n_connection_new(S2N_CLIENT);
EXPECT_SUCCESS(s2n_connection_set_blinding(conn, S2N_SELF_SERVICE_BLINDING));
s2n_connection_set_io_pair(conn, io_pair);

/* Change the format of the session state and check we cannot deserialize it */
Expand Down Expand Up @@ -560,6 +561,7 @@ int main(int argc, char **argv)
/* Wipe connections and set up new handshake */
EXPECT_SUCCESS(s2n_connection_wipe(server_conn));
EXPECT_SUCCESS(s2n_connection_wipe(client_conn));
EXPECT_SUCCESS(s2n_connection_set_blinding(server_conn, S2N_SELF_SERVICE_BLINDING));
EXPECT_SUCCESS(s2n_io_pair_close(&io_pair));
EXPECT_SUCCESS(s2n_io_pair_init_non_blocking(&io_pair));
EXPECT_SUCCESS(s2n_connections_set_io_pair(client_conn, server_conn, &io_pair));
Expand Down

0 comments on commit 1b9b1d6

Please sign in to comment.