Skip to content

Commit f6be6c8

Browse files
committed
Add timeout assertions to DTLS test
1 parent cd0d986 commit f6be6c8

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

tests/api/test_dtls.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1676,16 +1676,19 @@ int test_dtls_timeout(void)
16761676
ExpectIntEQ(wolfSSL_dtls_got_timeout(ssl_c), WOLFSSL_SUCCESS);
16771677
#endif
16781678
ExpectIntEQ(wolfSSL_dtls_got_timeout(ssl_c), WOLFSSL_SUCCESS);
1679+
ExpectIntEQ(wolfSSL_dtls_get_current_timeout(ssl_c), 2);
16791680
ExpectIntEQ(wolfSSL_negotiate(ssl_s), -1);
16801681
ExpectIntEQ(wolfSSL_get_error(ssl_s, -1), WOLFSSL_ERROR_WANT_READ);
16811682
ExpectIntEQ(wolfSSL_negotiate(ssl_c), -1);
16821683
ExpectIntEQ(wolfSSL_get_error(ssl_c, -1), WOLFSSL_ERROR_WANT_READ);
1684+
ExpectIntEQ(wolfSSL_dtls_get_current_timeout(ssl_c), 1);
16831685
#if defined(WOLFSSL_TLS13) && defined(WOLFSSL_DTLS13)
16841686
/* will return 0 when not 1.3 */
16851687
if (wolfSSL_dtls13_use_quick_timeout(ssl_c))
16861688
ExpectIntEQ(wolfSSL_dtls_got_timeout(ssl_c), WOLFSSL_SUCCESS);
16871689
#endif
16881690
ExpectIntEQ(wolfSSL_dtls_got_timeout(ssl_c), WOLFSSL_SUCCESS);
1691+
ExpectIntEQ(wolfSSL_dtls_get_current_timeout(ssl_c), 2);
16891692
ExpectIntEQ(test_memio_do_handshake(ssl_c, ssl_s, 10, NULL), 0);
16901693

16911694
wolfSSL_free(ssl_s);

0 commit comments

Comments
 (0)