Skip to content

Commit

Permalink
[Apollo] Accelerate test scenarios, while preserving stability
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
teoparvanov committed Jul 23, 2020
1 parent c621a10 commit f3a1ba1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
6 changes: 4 additions & 2 deletions tests/apollo/test_skvbc_backup_restore.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,17 @@ 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)
await trio.sleep(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)
Expand Down
2 changes: 1 addition & 1 deletion tests/apollo/test_skvbc_network_partitioning.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tests/apollo/test_skvbc_view_change.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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}))
Expand Down
2 changes: 1 addition & 1 deletion tests/simpleKVBC/TesterReplica/internalCommandsHandler.cpp
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit f3a1ba1

Please sign in to comment.