Disable (intermittently) failing unit tests (#3512)
* Disable (intermitently) failing unit tests * Adjust test.sh bash script not to retry failed unit tests * Add comments to intermittently failing (disabled) tests with PR and issue URLs * Disable intermittently failing unit test active_transactions.confirm_active * Fix formatting * Fix build * Disable intermittently failing unit test telemetry.remove_peer_different_genesis
This commit is contained in:
		
					parent
					
						
							
								9bb89ab323
							
						
					
				
			
			
				commit
				
					
						504296788f
					
				
			
		
					 8 changed files with 36 additions and 30 deletions
				
			
		
							
								
								
									
										31
									
								
								ci/test.sh
									
										
									
									
									
								
							
							
						
						
									
										31
									
								
								ci/test.sh
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -23,7 +23,8 @@ set -o nounset
 | 
			
		|||
set -o xtrace
 | 
			
		||||
 | 
			
		||||
# Alpine doesn't offer an xvfb
 | 
			
		||||
xvfb_run_() {
 | 
			
		||||
xvfb_run_()
 | 
			
		||||
{
 | 
			
		||||
    INIT_DELAY_SEC=3
 | 
			
		||||
 | 
			
		||||
    Xvfb :2 -screen 0 1024x768x24 &
 | 
			
		||||
| 
						 | 
				
			
			@ -36,33 +37,18 @@ xvfb_run_() {
 | 
			
		|||
    return ${res}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
run_tests() {
 | 
			
		||||
    local tries try
 | 
			
		||||
 | 
			
		||||
    # when busybox pretends to be bash it needs different args
 | 
			
		||||
    #   for the timeout builtin
 | 
			
		||||
run_tests()
 | 
			
		||||
{
 | 
			
		||||
    # when busybox pretends to be bash it needs different args for the timeout builtin
 | 
			
		||||
    #
 | 
			
		||||
    if [[ "${BUSYBOX_BASH}" -eq 1 ]]; then
 | 
			
		||||
        TIMEOUT_TIME_ARG="-t"
 | 
			
		||||
    else
 | 
			
		||||
        TIMEOUT_TIME_ARG=""
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    tries=(_initial_)
 | 
			
		||||
 | 
			
		||||
    for try in "${tries[@]}"; do
 | 
			
		||||
        if [ "${try}" != '_initial_' ]; then
 | 
			
		||||
            echo "core_test failed: ${core_test_res}, retrying (try=${try})"
 | 
			
		||||
 | 
			
		||||
            # Wait a while for sockets to be all cleaned up by the kernel
 | 
			
		||||
            sleep $((30 + (RANDOM % 30)))
 | 
			
		||||
        fi
 | 
			
		||||
 | 
			
		||||
        ${TIMEOUT_CMD} ${TIMEOUT_TIME_ARG} ${TIMEOUT_DEFAULT} ./core_test
 | 
			
		||||
        core_test_res=${?}
 | 
			
		||||
        if [ "${core_test_res}" = '0' ]; then
 | 
			
		||||
            break
 | 
			
		||||
        fi
 | 
			
		||||
    done
 | 
			
		||||
    ${TIMEOUT_CMD} ${TIMEOUT_TIME_ARG} ${TIMEOUT_DEFAULT} ./core_test
 | 
			
		||||
    core_test_res=${?}
 | 
			
		||||
 | 
			
		||||
    ${TIMEOUT_CMD} ${TIMEOUT_TIME_ARG} ${TIMEOUT_DEFAULT} ./rpc_test
 | 
			
		||||
    rpc_test_res=${?}
 | 
			
		||||
| 
						 | 
				
			
			@ -77,6 +63,7 @@ run_tests() {
 | 
			
		|||
    echo "RPC  Test return code: ${rpc_test_res}"
 | 
			
		||||
    echo "QT Test return code: ${qt_test_res}"
 | 
			
		||||
    echo "Sys Test return code: ${sys_test_res}"
 | 
			
		||||
 | 
			
		||||
    if [[ ${core_test_res} != 0 || ${rpc_test_res} != 0 || ${qt_test_res} != 0 || ${sys_test_res} != 0 ]]; then
 | 
			
		||||
        return 1
 | 
			
		||||
    else
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -11,7 +11,10 @@ using namespace std::chrono_literals;
 | 
			
		|||
 | 
			
		||||
namespace nano
 | 
			
		||||
{
 | 
			
		||||
TEST (active_transactions, confirm_active)
 | 
			
		||||
// Test disabled because it's failing intermittently.
 | 
			
		||||
// PR in which it got disabled: https://github.com/nanocurrency/nano-node/pull/3512
 | 
			
		||||
// Issue for investigating it: https://github.com/nanocurrency/nano-node/issues/3522
 | 
			
		||||
TEST (active_transactions, DISABLED_confirm_active)
 | 
			
		||||
{
 | 
			
		||||
	nano::system system;
 | 
			
		||||
	nano::node_flags node_flags;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -404,7 +404,11 @@ TEST (bootstrap_processor, push_diamond)
 | 
			
		|||
	node1->stop ();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
TEST (bootstrap_processor, push_diamond_pruning)
 | 
			
		||||
// Check that an outgoing bootstrap request can push blocks
 | 
			
		||||
// Test disabled because it's failing intermittently.
 | 
			
		||||
// PR in which it got disabled: https://github.com/nanocurrency/nano-node/pull/3512
 | 
			
		||||
// Issue for investigating it: https://github.com/nanocurrency/nano-node/issues/3517
 | 
			
		||||
TEST (bootstrap_processor, DISABLED_push_diamond_pruning)
 | 
			
		||||
{
 | 
			
		||||
	nano::system system;
 | 
			
		||||
	nano::node_config config (nano::get_available_port (), system.logging);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1682,7 +1682,10 @@ TEST (node, DISABLED_fork_stale)
 | 
			
		|||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
TEST (node, broadcast_elected)
 | 
			
		||||
// Test disabled because it's failing intermittently.
 | 
			
		||||
// PR in which it got disabled: https://github.com/nanocurrency/nano-node/pull/3512
 | 
			
		||||
// Issue for investigating it: https://github.com/nanocurrency/nano-node/issues/3516
 | 
			
		||||
TEST (node, DISABLED_broadcast_elected)
 | 
			
		||||
{
 | 
			
		||||
	std::vector<nano::transport::transport_type> types{ nano::transport::transport_type::tcp, nano::transport::transport_type::udp };
 | 
			
		||||
	for (auto & type : types)
 | 
			
		||||
| 
						 | 
				
			
			@ -1904,7 +1907,10 @@ TEST (node, DISABLED_bootstrap_no_publish)
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
// Check that an outgoing bootstrap request can push blocks
 | 
			
		||||
TEST (node, bootstrap_bulk_push)
 | 
			
		||||
// Test disabled because it's failing intermittently.
 | 
			
		||||
// PR in which it got disabled: https://github.com/nanocurrency/nano-node/pull/3512
 | 
			
		||||
// Issue for investigating it: https://github.com/nanocurrency/nano-node/issues/3515
 | 
			
		||||
TEST (node, DISABLED_bootstrap_bulk_push)
 | 
			
		||||
{
 | 
			
		||||
	nano::system system0;
 | 
			
		||||
	nano::system system1;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -545,7 +545,10 @@ TEST (telemetry, max_possible_size)
 | 
			
		|||
 | 
			
		||||
namespace nano
 | 
			
		||||
{
 | 
			
		||||
TEST (telemetry, remove_peer_different_genesis)
 | 
			
		||||
// Test disabled because it's failing intermittently.
 | 
			
		||||
// PR in which it got disabled: https://github.com/nanocurrency/nano-node/pull/3512
 | 
			
		||||
// Issue for investigating it: https://github.com/nanocurrency/nano-node/issues/3524
 | 
			
		||||
TEST (telemetry, DISABLED_remove_peer_different_genesis)
 | 
			
		||||
{
 | 
			
		||||
	nano::system system (1);
 | 
			
		||||
	auto node0 (system.nodes[0]);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -52,7 +52,7 @@ public:
 | 
			
		|||
	std::size_t limited_size (std::size_t const) const;
 | 
			
		||||
	std::size_t size () const;
 | 
			
		||||
 | 
			
		||||
	friend class telemetry_remove_peer_different_genesis_Test;
 | 
			
		||||
	friend class telemetry_DISABLED_remove_peer_different_genesis_Test;
 | 
			
		||||
	friend class telemetry_remove_peer_different_genesis_udp_Test;
 | 
			
		||||
	friend class telemetry_remove_peer_invalid_signature_Test;
 | 
			
		||||
	friend class peer_exclusion_validate_Test;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -150,7 +150,7 @@ private:
 | 
			
		|||
	/** Probable representatives */
 | 
			
		||||
	probably_rep_t probable_reps;
 | 
			
		||||
 | 
			
		||||
	friend class active_transactions_confirm_active_Test;
 | 
			
		||||
	friend class active_transactions_DISABLED_confirm_active_Test;
 | 
			
		||||
	friend class active_transactions_confirm_frontier_Test;
 | 
			
		||||
	friend class rep_crawler_local_Test;
 | 
			
		||||
	friend class node_online_reps_rep_crawler_Test;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -5162,7 +5162,10 @@ TEST (rpc, uptime)
 | 
			
		|||
	ASSERT_LE (1, response.get<int> ("seconds"));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
TEST (rpc, wallet_history)
 | 
			
		||||
// Test disabled because it's failing intermittently.
 | 
			
		||||
// PR in which it got disabled: https://github.com/nanocurrency/nano-node/pull/3512
 | 
			
		||||
// Issue for investigating it: https://github.com/nanocurrency/nano-node/issues/3514
 | 
			
		||||
TEST (rpc, DISABLED_wallet_history)
 | 
			
		||||
{
 | 
			
		||||
	nano::system system;
 | 
			
		||||
	nano::node_config node_config (nano::get_available_port (), system.logging);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue