Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Merge pull request #6799 from EOSIO/shoter_checktime_hashing_fail
Browse files Browse the repository at this point in the history
Reduce max time allowed for checktime_hashing_fail test
  • Loading branch information
spoonincode authored Feb 21, 2019
2 parents ba16735 + 7facd29 commit 3c033bd
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions unittests/api_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<TEST_METHOD("test_checktime", "checktime_sha1_failure")>{},
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<TEST_METHOD("test_checktime", "checktime_sha1_failure")>{},
5000, 10 ),
5000, 3 ),
deadline_exception, is_deadline_exception );

BOOST_CHECK_EXCEPTION( call_test( *this, test_api_action<TEST_METHOD("test_checktime", "checktime_assert_sha1_failure")>{},
5000, 10 ),
5000, 3 ),
deadline_exception, is_deadline_exception );

BOOST_CHECK_EXCEPTION( call_test( *this, test_api_action<TEST_METHOD("test_checktime", "checktime_sha256_failure")>{},
5000, 10 ),
5000, 3 ),
deadline_exception, is_deadline_exception );

BOOST_CHECK_EXCEPTION( call_test( *this, test_api_action<TEST_METHOD("test_checktime", "checktime_assert_sha256_failure")>{},
5000, 10 ),
5000, 3 ),
deadline_exception, is_deadline_exception );

BOOST_CHECK_EXCEPTION( call_test( *this, test_api_action<TEST_METHOD("test_checktime", "checktime_sha512_failure")>{},
5000, 10 ),
5000, 3 ),
deadline_exception, is_deadline_exception );

BOOST_CHECK_EXCEPTION( call_test( *this, test_api_action<TEST_METHOD("test_checktime", "checktime_assert_sha512_failure")>{},
5000, 10 ),
5000, 3 ),
deadline_exception, is_deadline_exception );

BOOST_CHECK_EXCEPTION( call_test( *this, test_api_action<TEST_METHOD("test_checktime", "checktime_ripemd160_failure")>{},
5000, 10 ),
5000, 3 ),
deadline_exception, is_deadline_exception );

BOOST_CHECK_EXCEPTION( call_test( *this, test_api_action<TEST_METHOD("test_checktime", "checktime_assert_ripemd160_failure")>{},
5000, 10 ),
5000, 3 ),
deadline_exception, is_deadline_exception );

BOOST_REQUIRE_EQUAL( validate(), true );
Expand Down

0 comments on commit 3c033bd

Please sign in to comment.