Remove redundant suspension-based rotation test (#2650)

This commit is contained in:
Amaury Chamayou 2021-06-10 18:37:34 +01:00 коммит произвёл GitHub
Родитель 134b3c5dd5
Коммит 96daff8334
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 2 добавлений и 47 удалений

Просмотреть файл

@ -849,9 +849,7 @@ if(BUILD_TESTS)
)
if(LONG_TESTS)
set(ROTATION_TEST_ARGS --rotation-retirements 10 --rotation-suspensions
10
)
set(ROTATION_TEST_ARGS --rotation-retirements 10)
endif()
add_e2e_test(

Просмотреть файл

@ -3,3 +3,4 @@ requests >= 2.24, == 2.*
requests-http-signature >= 0.2, == 0.*
websocket-client >= 0.57, == 0.*
cryptography >= 3.2, == 3.*
types-requests

Просмотреть файл

@ -3,42 +3,11 @@
import infra.e2e_args
import infra.network
import infra.proc
import suite.test_requirements as reqs
import reconfiguration
import time
from infra.checker import check_can_progress
from ccf.clients import CCFConnectionException
from loguru import logger as LOG
@reqs.description("Suspend and resume primary")
@reqs.can_kill_n_nodes(1)
def test_suspend_primary(network, args):
primary, backup = network.find_primary_and_any_backup()
primary.suspend()
if args.consensus == "bft":
try:
for _ in range(3):
with backup.client("user0") as c:
_ = c.post(
"/app/log/private",
{
"id": -1,
"msg": "This is submitted to force a view change",
},
)
time.sleep(5)
backup = network.find_any_backup()
except CCFConnectionException:
LOG.warning(f"Could not successfully connect to node {backup.node_id}.")
new_primary, _ = network.wait_for_new_primary(primary)
check_can_progress(new_primary)
primary.resume()
check_can_progress(new_primary)
return network
def run(args):
with infra.network.network(
args.nodes, args.binary_dir, args.debug_nodes, args.perf_nodes, pdb=args.pdb
@ -53,13 +22,6 @@ def run(args):
reconfiguration.test_add_node(network, args)
reconfiguration.test_retire_primary(network, args)
reconfiguration.test_add_node(network, args)
# Suspend primary repeatedly and check the network still operates
LOG.info(f"Suspending primary {args.rotation_suspensions} times")
for i in range(args.rotation_suspensions):
LOG.warning(f"Suspension {i}")
test_suspend_primary(network, args)
if __name__ == "__main__":
@ -70,12 +32,6 @@ if __name__ == "__main__":
type=int,
default=3,
)
parser.add_argument(
"--rotation-suspensions",
help="Number of times to suspend the primary",
type=int,
default=3,
)
args = infra.e2e_args.cli_args(add=add)
args.package = "liblogging"