From 7facd29b5bc15360d72d51d43ef5718f71684e03 Mon Sep 17 00:00:00 2001 From: Matt Witherspoon <32485495+spoonincode@users.noreply.github.com> Date: Thu, 21 Feb 2019 09:43:48 -0500 Subject: [PATCH] Reduce max time allowed for checktime_hashing_fail test On my box I'm seeing periodic failures here where the code completes before 10ms. Reduce the allowed time to 3ms (picked via fair dice roll) --- unittests/api_tests.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/unittests/api_tests.cpp b/unittests/api_tests.cpp index 6a26144a4d6..1d4fedc0e7c 100644 --- a/unittests/api_tests.cpp +++ b/unittests/api_tests.cpp @@ -982,42 +982,42 @@ BOOST_FIXTURE_TEST_CASE(checktime_hashing_fail, TESTER) { try { //hit deadline exception, but cache the contract BOOST_CHECK_EXCEPTION( call_test( *this, test_api_action{}, - 5000, 10 ), + 5000, 3 ), deadline_exception, is_deadline_exception ); #warning TODO validate that the contract was successfully cached //the contract should be cached, now we should get deadline_exception because of calls to checktime() from hashing function BOOST_CHECK_EXCEPTION( call_test( *this, test_api_action{}, - 5000, 10 ), + 5000, 3 ), deadline_exception, is_deadline_exception ); BOOST_CHECK_EXCEPTION( call_test( *this, test_api_action{}, - 5000, 10 ), + 5000, 3 ), deadline_exception, is_deadline_exception ); BOOST_CHECK_EXCEPTION( call_test( *this, test_api_action{}, - 5000, 10 ), + 5000, 3 ), deadline_exception, is_deadline_exception ); BOOST_CHECK_EXCEPTION( call_test( *this, test_api_action{}, - 5000, 10 ), + 5000, 3 ), deadline_exception, is_deadline_exception ); BOOST_CHECK_EXCEPTION( call_test( *this, test_api_action{}, - 5000, 10 ), + 5000, 3 ), deadline_exception, is_deadline_exception ); BOOST_CHECK_EXCEPTION( call_test( *this, test_api_action{}, - 5000, 10 ), + 5000, 3 ), deadline_exception, is_deadline_exception ); BOOST_CHECK_EXCEPTION( call_test( *this, test_api_action{}, - 5000, 10 ), + 5000, 3 ), deadline_exception, is_deadline_exception ); BOOST_CHECK_EXCEPTION( call_test( *this, test_api_action{}, - 5000, 10 ), + 5000, 3 ), deadline_exception, is_deadline_exception ); BOOST_REQUIRE_EQUAL( validate(), true );