From cf93141eaee10fad26effc847c44f3d1cab89e05 Mon Sep 17 00:00:00 2001 From: huitema <huitema@huitema.net> Date: Tue, 27 Nov 2018 17:47:26 -0800 Subject: [PATCH] Set time limit for retry test --- picoquictest/tls_api_test.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/picoquictest/tls_api_test.c b/picoquictest/tls_api_test.c index ac769b31..5d462b9f 100644 --- a/picoquictest/tls_api_test.c +++ b/picoquictest/tls_api_test.c @@ -1520,6 +1520,7 @@ int tls_api_bad_server_reset_test() int tls_api_retry_test() { uint64_t simulated_time = 0; + const uint64_t target_time = 210000ull; uint64_t loss_mask = 0; picoquic_test_tls_api_ctx_t* test_ctx = NULL; int ret = tls_api_init_ctx(&test_ctx, 0, PICOQUIC_TEST_SNI, PICOQUIC_TEST_ALPN, &simulated_time, NULL, 0, 0, 0); @@ -1535,6 +1536,11 @@ int tls_api_retry_test() ret = tls_api_attempt_to_close(test_ctx, &simulated_time); } + if (ret == 0 && simulated_time > target_time) { + DBG_PRINTF("Retry test completes in %llu microsec, more than %llu\n", simulated_time, target_time); + ret = -1; + } + if (test_ctx != NULL) { tls_api_delete_ctx(test_ctx); test_ctx = NULL; -- GitLab