From f3a1ba1aee8219a3335bd3391060887d0ef621b9 Mon Sep 17 00:00:00 2001 From: teoparvanov Date: Wed, 22 Jul 2020 09:50:02 +0300 Subject: [PATCH] [Apollo] Accelerate test scenarios, while preserving stability Once again, we have hit the 50 min limitation for Travis job executions. This PR aims to mitigate the limitation. PS: Ultimately, we should focus on stabilizing GitHub Actions runs, and drop Travis CI altogether. --- tests/apollo/test_skvbc_backup_restore.py | 6 ++++-- tests/apollo/test_skvbc_network_partitioning.py | 2 +- tests/apollo/test_skvbc_view_change.py | 4 ++-- tests/simpleKVBC/TesterReplica/internalCommandsHandler.cpp | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/apollo/test_skvbc_backup_restore.py b/tests/apollo/test_skvbc_backup_restore.py index abf8b86857..857620b1b1 100644 --- a/tests/apollo/test_skvbc_backup_restore.py +++ b/tests/apollo/test_skvbc_backup_restore.py @@ -102,7 +102,8 @@ async def test_checkpoint_propagation_after_restarting_replicas(self, bft_networ ) @staticmethod - async def _stop_random_replicas_with_delay(bft_network, replica_set_size, delay=10, exclude_replicas=None): + async def _stop_random_replicas_with_delay( + bft_network, replica_set_size, delay=5, exclude_replicas=None): random_replicas = bft_network.random_set_of_replicas(size=replica_set_size, without=exclude_replicas) for replica in random_replicas: bft_network.stop_replica(replica) @@ -110,7 +111,8 @@ async def _stop_random_replicas_with_delay(bft_network, replica_set_size, delay= return list(random_replicas) @staticmethod - async def _start_random_replicas_with_delay(bft_network, stopped_replicas, delay=10): + async def _start_random_replicas_with_delay( + bft_network, stopped_replicas, delay=5): random.shuffle(stopped_replicas) for replica in stopped_replicas: bft_network.start_replica(replica) diff --git a/tests/apollo/test_skvbc_network_partitioning.py b/tests/apollo/test_skvbc_network_partitioning.py index 4694b351fc..3b7490842f 100644 --- a/tests/apollo/test_skvbc_network_partitioning.py +++ b/tests/apollo/test_skvbc_network_partitioning.py @@ -218,7 +218,7 @@ async def test_isolate_non_primaries_subset_with_view_change(self, bft_network, ) # waiting for the active window to be rebuilt after the view change - await trio.sleep(seconds=10) + await trio.sleep(seconds=5) # the adversary is not active anymore: # make sure the isolated replicas activate the new view diff --git a/tests/apollo/test_skvbc_view_change.py b/tests/apollo/test_skvbc_view_change.py index f724356cc5..d24b1ecc43 100644 --- a/tests/apollo/test_skvbc_view_change.py +++ b/tests/apollo/test_skvbc_view_change.py @@ -221,7 +221,7 @@ async def test_crashed_replica_catch_up_after_view_change(self, bft_network, tra ) # waiting for the active window to be rebuilt after the view change - await trio.sleep(seconds=10) + await trio.sleep(seconds=5) # restart the unstable replica and make sure it works in the new view bft_network.start_replica(unstable_replica) @@ -266,7 +266,7 @@ async def test_restart_replica_after_view_change(self, bft_network, tracker): bft_network.start_replica(initial_primary) # waiting for the active window to be rebuilt after the view change - await trio.sleep(seconds=10) + await trio.sleep(seconds=5) unstable_replica = random.choice( bft_network.all_replicas(without={current_primary, initial_primary})) diff --git a/tests/simpleKVBC/TesterReplica/internalCommandsHandler.cpp b/tests/simpleKVBC/TesterReplica/internalCommandsHandler.cpp index 3437f3a6b1..3a5a3da1d0 100644 --- a/tests/simpleKVBC/TesterReplica/internalCommandsHandler.cpp +++ b/tests/simpleKVBC/TesterReplica/internalCommandsHandler.cpp @@ -1,6 +1,6 @@ // Concord // -// Copyright (c) 2018-2019 VMware, Inc. All Rights Reserved. +// Copyright (c) 2018-2020 VMware, Inc. All Rights Reserved. // // This product is licensed to you under the Apache 2.0 license (the "License"). // You may not use this product except in compliance with the Apache 2.0