def loadtest():
    """loadtest: run all scenarios forever."""

    qty = 1
    stagger_delay = 1
    overall_delay = 0
    notif_delay = 2
    run_once = 0

    yield spawn("aplt.scenarios:connect_and_idle_forever, %s, %s, %s" %
                (qty, stagger_delay, overall_delay))

    # While not required, it's a good idea to label your arguments so
    # you know how they're being applied by the function.
    yield spawn("aplt.scenarios:reconnect_forever, %s, %s, %s, "
                "reconnect_delay=%s, run_once=%s" %
                (qty, stagger_delay, overall_delay, notif_delay, run_once))

    yield spawn("aplt.scenarios:register_forever, %s, %s, %s, reg_delay=%s, "
                "run_once=%s" %
                (qty, stagger_delay, overall_delay, notif_delay, run_once))

    yield spawn(
        "aplt.scenarios:notification_forever, %s, %s, %s, notif_delay=%s, "
        "run_once=%s" %
        (qty, stagger_delay, overall_delay, notif_delay, run_once))

    qty_stored = 30
    ttl = 300

    yield spawn("aplt.scenarios:notification_forever_stored, "
                "%s, %s, %s, qty_stored= %s, ttl=%s, notif_delay=%s, "
                "run_once=%s" % (qty, stagger_delay, overall_delay, qty_stored,
                                 ttl, notif_delay, run_once))

    yield spawn(
        "aplt.scenarios:notification_forever_unsubscribed, %s, %s, %s, "
        "notif_delay=%s, run_once=%s" %
        (qty, stagger_delay, overall_delay, notif_delay, run_once))

    yield spawn("aplt.scenarios:notification_forever_bad_tokens, %s, %s, %s, "
                "%s, run_once=%s" %
                (qty, stagger_delay, overall_delay, notif_delay, run_once))

    yield spawn(
        "aplt.scenarios:notification_forever_bad_endpoints, %s, %s, %s, "
        "notif_delay=%s, run_once=%s" %
        (qty, stagger_delay, overall_delay, notif_delay, run_once))
def api_test():
    """API test: run scenarios once, then stop."""

    qty = 1
    stagger_delay = 1
    overall_delay = 0
    notif_delay = 2
    run_once = 1

    yield spawn("aplt.scenarios:basic, %s, %s, %s" %
                (qty, stagger_delay, overall_delay))

    yield spawn(
        "aplt.scenarios:notification_forever_unsubscribed, %s, %s, %s, %s, %s"
        % (qty, stagger_delay, overall_delay, notif_delay, run_once))

    yield spawn(
        "aplt.scenarios:notification_forever_bad_tokens, %s, %s, %s, %s, %s" %
        (qty, stagger_delay, overall_delay, notif_delay, run_once))

    yield spawn(
        "aplt.scenarios:notification_forever_bad_endpoints, %s, %s, %s, %s, %s"
        % (qty, stagger_delay, overall_delay, notif_delay, run_once))
Пример #3
0
def loadtest():
    """loadtest: run all scenarios forever."""

    qty = 1
    stagger_delay = 1
    overall_delay = 0
    notif_delay = 2
    run_once = 0

    yield spawn(
        "aplt.scenarios:connect_and_idle_forever, %s, %s, %s"
        % (qty, stagger_delay, overall_delay))

    yield spawn(
        "aplt.scenarios:reconnect_forever, %s, %s, %s, %s, %s"
        % (qty, stagger_delay, overall_delay, notif_delay, run_once))

    yield spawn(
        "aplt.scenarios:register_forever, %s, %s, %s, %s, %s"
        % (qty, stagger_delay, overall_delay, notif_delay, run_once))

    yield spawn(
        "aplt.scenarios:notification_forever, %s, %s, %s, %s, %s"
        % (qty, stagger_delay, overall_delay, notif_delay, run_once))

    qty_stored = 30
    ttl = 300
    flood_delay = 1

    yield spawn(
        "aplt.scenarios:notification_forever_stored, \
         %s, %s, %s, %s, %s, %s, %s, %s"
        % (qty, stagger_delay, overall_delay, qty_stored,
           ttl, flood_delay, notif_delay, run_once))

    yield spawn(
        "aplt.scenarios:notification_forever_unsubscribed, %s, %s, %s, %s, %s"
        % (qty, stagger_delay, overall_delay, notif_delay, run_once))

    yield spawn(
        "aplt.scenarios:notification_forever_bad_tokens, %s, %s, %s, %s, %s"
        % (qty, stagger_delay, overall_delay, notif_delay, run_once))

    yield spawn(
        "aplt.scenarios:notification_forever_bad_endpoints, %s, %s, %s, %s, %s"
        % (qty, stagger_delay, overall_delay, notif_delay, run_once))
Пример #4
0
def api_test():
    """API test: run scenarios once, then stop."""

    qty = 1
    stagger_delay = 1
    overall_delay = 0
    notif_delay = 2
    run_once = 1

    yield spawn(
        "aplt.scenarios:basic, %s, %s, %s"
        % (qty, stagger_delay, overall_delay))

    yield spawn(
        "aplt.scenarios:notification_forever_unsubscribed, %s, %s, %s, %s, %s"
        % (qty, stagger_delay, overall_delay, notif_delay, run_once))

    yield spawn(
        "aplt.scenarios:notification_forever_bad_tokens, %s, %s, %s, %s, %s"
        % (qty, stagger_delay, overall_delay, notif_delay, run_once))

    yield spawn(
        "aplt.scenarios:notification_forever_bad_endpoints, %s, %s, %s, %s, %s"
        % (qty, stagger_delay, overall_delay, notif_delay, run_once))
def _test_multiple_spawn():
    yield spawn("aplt.scenarios:basic, 1, 1, 0")
    yield spawn("aplt.scenarios:basic, 1, 1, 0")
    yield spawn("aplt.scenarios:basic, 1, 1, 0")
    yield spawn("aplt.scenarios:basic, 1, 1, 0")
def _test_spawn():
    yield spawn("aplt.scenarios:basic, 1, 1, 0")
Пример #7
0
def _test_multiple_spawn():
    yield spawn("aplt.scenarios:basic, 1, 1, 0")
    yield spawn("aplt.scenarios:basic, 1, 1, 0")
    yield spawn("aplt.scenarios:basic, 1, 1, 0")
    yield spawn("aplt.scenarios:basic, 1, 1, 0")
Пример #8
0
def _test_spawn():
    yield spawn("aplt.scenarios:basic, 1, 1, 0")