GTEST_SKIP calls added (#4157)
Replace unit test early exit return statements with GTEST_SKIP macros. --------- Co-authored-by: Moliner <Mario.Moliner@es.nestle.com> Co-authored-by: clemahieu <clemahieu@gmail.com>
This commit is contained in:
parent
fef5fe8555
commit
900dda8386
5 changed files with 21 additions and 21 deletions
|
|
@ -639,7 +639,7 @@ namespace lmdb
|
||||||
if (nano::rocksdb_config::using_rocksdb_in_tests ())
|
if (nano::rocksdb_config::using_rocksdb_in_tests ())
|
||||||
{
|
{
|
||||||
// Don't test this in rocksdb mode
|
// Don't test this in rocksdb mode
|
||||||
return;
|
GTEST_SKIP ();
|
||||||
}
|
}
|
||||||
// Check that upgrading from an unsupported version is not supported
|
// Check that upgrading from an unsupported version is not supported
|
||||||
auto path (nano::unique_path ());
|
auto path (nano::unique_path ());
|
||||||
|
|
@ -693,7 +693,7 @@ TEST (mdb_block_store, bad_path)
|
||||||
if (nano::rocksdb_config::using_rocksdb_in_tests ())
|
if (nano::rocksdb_config::using_rocksdb_in_tests ())
|
||||||
{
|
{
|
||||||
// Don't test this in rocksdb mode
|
// Don't test this in rocksdb mode
|
||||||
return;
|
GTEST_SKIP ();
|
||||||
}
|
}
|
||||||
nano::logger_mt logger;
|
nano::logger_mt logger;
|
||||||
nano::lmdb::store store (logger, boost::filesystem::path ("///"), nano::dev::constants);
|
nano::lmdb::store store (logger, boost::filesystem::path ("///"), nano::dev::constants);
|
||||||
|
|
@ -1057,7 +1057,7 @@ TEST (mdb_block_store, sideband_height)
|
||||||
if (nano::rocksdb_config::using_rocksdb_in_tests ())
|
if (nano::rocksdb_config::using_rocksdb_in_tests ())
|
||||||
{
|
{
|
||||||
// Don't test this in rocksdb mode
|
// Don't test this in rocksdb mode
|
||||||
return;
|
GTEST_SKIP ();
|
||||||
}
|
}
|
||||||
nano::logger_mt logger;
|
nano::logger_mt logger;
|
||||||
nano::keypair key1;
|
nano::keypair key1;
|
||||||
|
|
@ -1430,7 +1430,7 @@ namespace lmdb
|
||||||
if (nano::rocksdb_config::using_rocksdb_in_tests ())
|
if (nano::rocksdb_config::using_rocksdb_in_tests ())
|
||||||
{
|
{
|
||||||
// Don't test this in rocksdb mode
|
// Don't test this in rocksdb mode
|
||||||
return;
|
GTEST_SKIP ();
|
||||||
}
|
}
|
||||||
// Extract confirmation height to a separate database
|
// Extract confirmation height to a separate database
|
||||||
auto path (nano::unique_path ());
|
auto path (nano::unique_path ());
|
||||||
|
|
@ -1593,7 +1593,7 @@ namespace lmdb
|
||||||
if (nano::rocksdb_config::using_rocksdb_in_tests ())
|
if (nano::rocksdb_config::using_rocksdb_in_tests ())
|
||||||
{
|
{
|
||||||
// Don't test this in rocksdb mode
|
// Don't test this in rocksdb mode
|
||||||
return;
|
GTEST_SKIP ();
|
||||||
}
|
}
|
||||||
auto path (nano::unique_path ());
|
auto path (nano::unique_path ());
|
||||||
nano::mdb_val value;
|
nano::mdb_val value;
|
||||||
|
|
@ -1640,7 +1640,7 @@ namespace lmdb
|
||||||
if (nano::rocksdb_config::using_rocksdb_in_tests ())
|
if (nano::rocksdb_config::using_rocksdb_in_tests ())
|
||||||
{
|
{
|
||||||
// Don't test this in rocksdb mode
|
// Don't test this in rocksdb mode
|
||||||
return;
|
GTEST_SKIP ();
|
||||||
}
|
}
|
||||||
nano::work_pool pool{ nano::dev::network_params.network, std::numeric_limits<unsigned>::max () };
|
nano::work_pool pool{ nano::dev::network_params.network, std::numeric_limits<unsigned>::max () };
|
||||||
nano::block_builder builder;
|
nano::block_builder builder;
|
||||||
|
|
@ -1730,7 +1730,7 @@ namespace lmdb
|
||||||
if (nano::rocksdb_config::using_rocksdb_in_tests ())
|
if (nano::rocksdb_config::using_rocksdb_in_tests ())
|
||||||
{
|
{
|
||||||
// Don't test this in rocksdb mode
|
// Don't test this in rocksdb mode
|
||||||
return;
|
GTEST_SKIP ();
|
||||||
}
|
}
|
||||||
auto path (nano::unique_path ());
|
auto path (nano::unique_path ());
|
||||||
nano::block_builder builder;
|
nano::block_builder builder;
|
||||||
|
|
@ -2039,7 +2039,7 @@ namespace lmdb
|
||||||
if (nano::rocksdb_config::using_rocksdb_in_tests ())
|
if (nano::rocksdb_config::using_rocksdb_in_tests ())
|
||||||
{
|
{
|
||||||
// Don't test this in rocksdb mode
|
// Don't test this in rocksdb mode
|
||||||
return;
|
GTEST_SKIP ();
|
||||||
}
|
}
|
||||||
auto path (nano::unique_path ());
|
auto path (nano::unique_path ());
|
||||||
nano::keypair key1;
|
nano::keypair key1;
|
||||||
|
|
@ -2176,7 +2176,7 @@ namespace lmdb
|
||||||
if (nano::rocksdb_config::using_rocksdb_in_tests ())
|
if (nano::rocksdb_config::using_rocksdb_in_tests ())
|
||||||
{
|
{
|
||||||
// Don't test this in rocksdb mode
|
// Don't test this in rocksdb mode
|
||||||
return;
|
GTEST_SKIP ();
|
||||||
}
|
}
|
||||||
auto path (nano::unique_path ());
|
auto path (nano::unique_path ());
|
||||||
nano::logger_mt logger;
|
nano::logger_mt logger;
|
||||||
|
|
@ -2205,7 +2205,7 @@ namespace lmdb
|
||||||
if (nano::rocksdb_config::using_rocksdb_in_tests ())
|
if (nano::rocksdb_config::using_rocksdb_in_tests ())
|
||||||
{
|
{
|
||||||
// Don't test this in rocksdb mode
|
// Don't test this in rocksdb mode
|
||||||
return;
|
GTEST_SKIP ();
|
||||||
}
|
}
|
||||||
auto path (nano::unique_path ());
|
auto path (nano::unique_path ());
|
||||||
nano::logger_mt logger;
|
nano::logger_mt logger;
|
||||||
|
|
@ -2236,7 +2236,7 @@ TEST (mdb_block_store, upgrade_backup)
|
||||||
if (nano::rocksdb_config::using_rocksdb_in_tests ())
|
if (nano::rocksdb_config::using_rocksdb_in_tests ())
|
||||||
{
|
{
|
||||||
// Don't test this in rocksdb mode
|
// Don't test this in rocksdb mode
|
||||||
return;
|
GTEST_SKIP ();
|
||||||
}
|
}
|
||||||
auto dir (nano::unique_path ());
|
auto dir (nano::unique_path ());
|
||||||
namespace fs = boost::filesystem;
|
namespace fs = boost::filesystem;
|
||||||
|
|
@ -2277,7 +2277,7 @@ TEST (block_store, confirmation_height)
|
||||||
if (nano::rocksdb_config::using_rocksdb_in_tests ())
|
if (nano::rocksdb_config::using_rocksdb_in_tests ())
|
||||||
{
|
{
|
||||||
// Don't test this in rocksdb mode
|
// Don't test this in rocksdb mode
|
||||||
return;
|
GTEST_SKIP ();
|
||||||
}
|
}
|
||||||
auto path (nano::unique_path ());
|
auto path (nano::unique_path ());
|
||||||
nano::logger_mt logger;
|
nano::logger_mt logger;
|
||||||
|
|
@ -2323,7 +2323,7 @@ TEST (block_store, final_vote)
|
||||||
if (nano::rocksdb_config::using_rocksdb_in_tests ())
|
if (nano::rocksdb_config::using_rocksdb_in_tests ())
|
||||||
{
|
{
|
||||||
// Don't test this in rocksdb mode as deletions cause inaccurate counts
|
// Don't test this in rocksdb mode as deletions cause inaccurate counts
|
||||||
return;
|
GTEST_SKIP ();
|
||||||
}
|
}
|
||||||
auto path (nano::unique_path ());
|
auto path (nano::unique_path ());
|
||||||
nano::logger_mt logger;
|
nano::logger_mt logger;
|
||||||
|
|
@ -2441,7 +2441,7 @@ TEST (rocksdb_block_store, tombstone_count)
|
||||||
{
|
{
|
||||||
if (!nano::rocksdb_config::using_rocksdb_in_tests ())
|
if (!nano::rocksdb_config::using_rocksdb_in_tests ())
|
||||||
{
|
{
|
||||||
return;
|
GTEST_SKIP ();
|
||||||
}
|
}
|
||||||
nano::test::system system{};
|
nano::test::system system{};
|
||||||
nano::logger_mt logger;
|
nano::logger_mt logger;
|
||||||
|
|
|
||||||
|
|
@ -1195,7 +1195,7 @@ TEST (confirmation_heightDeathTest, rollback_added_block)
|
||||||
if (nano::rocksdb_config::using_rocksdb_in_tests ())
|
if (nano::rocksdb_config::using_rocksdb_in_tests ())
|
||||||
{
|
{
|
||||||
// Don't test this in rocksdb mode
|
// Don't test this in rocksdb mode
|
||||||
return;
|
GTEST_SKIP ();
|
||||||
}
|
}
|
||||||
// For ASSERT_DEATH_IF_SUPPORTED
|
// For ASSERT_DEATH_IF_SUPPORTED
|
||||||
testing::FLAGS_gtest_death_test_style = "threadsafe";
|
testing::FLAGS_gtest_death_test_style = "threadsafe";
|
||||||
|
|
@ -1287,7 +1287,7 @@ TEST (confirmation_heightDeathTest, modified_chain)
|
||||||
if (nano::rocksdb_config::using_rocksdb_in_tests ())
|
if (nano::rocksdb_config::using_rocksdb_in_tests ())
|
||||||
{
|
{
|
||||||
// Don't test this in rocksdb mode
|
// Don't test this in rocksdb mode
|
||||||
return;
|
GTEST_SKIP ();
|
||||||
}
|
}
|
||||||
// For ASSERT_DEATH_IF_SUPPORTED
|
// For ASSERT_DEATH_IF_SUPPORTED
|
||||||
testing::FLAGS_gtest_death_test_style = "threadsafe";
|
testing::FLAGS_gtest_death_test_style = "threadsafe";
|
||||||
|
|
@ -1365,7 +1365,7 @@ TEST (confirmation_heightDeathTest, modified_chain_account_removed)
|
||||||
if (nano::rocksdb_config::using_rocksdb_in_tests ())
|
if (nano::rocksdb_config::using_rocksdb_in_tests ())
|
||||||
{
|
{
|
||||||
// Don't test this in rocksdb mode
|
// Don't test this in rocksdb mode
|
||||||
return;
|
GTEST_SKIP ();
|
||||||
}
|
}
|
||||||
// For ASSERT_DEATH_IF_SUPPORTED
|
// For ASSERT_DEATH_IF_SUPPORTED
|
||||||
testing::FLAGS_gtest_death_test_style = "threadsafe";
|
testing::FLAGS_gtest_death_test_style = "threadsafe";
|
||||||
|
|
@ -2083,7 +2083,7 @@ TEST (confirmation_height, unbounded_block_cache_iteration)
|
||||||
if (nano::rocksdb_config::using_rocksdb_in_tests ())
|
if (nano::rocksdb_config::using_rocksdb_in_tests ())
|
||||||
{
|
{
|
||||||
// Don't test this in rocksdb mode
|
// Don't test this in rocksdb mode
|
||||||
return;
|
GTEST_SKIP ();
|
||||||
}
|
}
|
||||||
nano::logger_mt logger;
|
nano::logger_mt logger;
|
||||||
auto path (nano::unique_path ());
|
auto path (nano::unique_path ());
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ TEST (ledger, store_error)
|
||||||
if (nano::rocksdb_config::using_rocksdb_in_tests ())
|
if (nano::rocksdb_config::using_rocksdb_in_tests ())
|
||||||
{
|
{
|
||||||
// Don't test this in rocksdb mode
|
// Don't test this in rocksdb mode
|
||||||
return;
|
GTEST_SKIP ();
|
||||||
}
|
}
|
||||||
auto ctx = nano::test::context::ledger_empty ();
|
auto ctx = nano::test::context::ledger_empty ();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3338,7 +3338,7 @@ TEST (node, bidirectional_tcp)
|
||||||
if (nano::rocksdb_config::using_rocksdb_in_tests ())
|
if (nano::rocksdb_config::using_rocksdb_in_tests ())
|
||||||
{
|
{
|
||||||
// Don't test this in rocksdb mode
|
// Don't test this in rocksdb mode
|
||||||
return;
|
GTEST_SKIP ();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
nano::test::system system;
|
nano::test::system system;
|
||||||
|
|
|
||||||
|
|
@ -138,7 +138,7 @@ TEST (unchecked, multiple)
|
||||||
if (nano::rocksdb_config::using_rocksdb_in_tests ())
|
if (nano::rocksdb_config::using_rocksdb_in_tests ())
|
||||||
{
|
{
|
||||||
// Don't test this in rocksdb mode
|
// Don't test this in rocksdb mode
|
||||||
return;
|
GTEST_SKIP ();
|
||||||
}
|
}
|
||||||
nano::logger_mt logger{};
|
nano::logger_mt logger{};
|
||||||
auto store = nano::make_store (logger, nano::unique_path (), nano::dev::constants);
|
auto store = nano::make_store (logger, nano::unique_path (), nano::dev::constants);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue