error_tolerant_workloads = [
    "$RETHINKDB/bench/stress-client/stress -s sockmemcached,$HOST:$PORT -w 0/0/1/0 -d infinity --ignore-protocol-errors"
    ]

scenarios = {
    'rebalance': "$RETHINKDB/test/scenarios/rebalance.py --workload-during '%(workload)s' --sequence 2,++,--,+-,+-,+++,--+,----",
    'relocate': "$RETHINKDB/test/scenarios/relocate_namespace.py --workload-during '%(workload)s'",
    'change-primary': "$RETHINKDB/test/scenarios/change_primary.py --workload-during '%(workload)s'",
    'failover': "$RETHINKDB/test/scenarios/failover_to_secondary.py --workload-during '%(workload)s'",
    'kill-secondary': "$RETHINKDB/test/scenarios/kill_secondary.py --workload-during '%(workload)s'",
    'more-or-less': "$RETHINKDB/test/scenarios/more_or_less_secondaries.py 1-1+1-1 --workload-during '%(workload)s'",
    'kill-access': "$RETHINKDB/test/scenarios/kill_access_point.py '%(workload)s'",
    }

for name, scenario in scenarios.items():
    for w in error_tolerant_workloads:
        generate_test(
            scenario % {"workload": w},
            name = name
            )
