diff options
| author | Daniil Fedotov <dfedotov@pivotal.io> | 2016-12-23 17:15:03 +0000 |
|---|---|---|
| committer | Daniil Fedotov <dfedotov@pivotal.io> | 2016-12-23 17:15:03 +0000 |
| commit | 0463c59f046dad645cc4f83b9c2289df755af85a (patch) | |
| tree | b3f48cb607b194e0bad8eb9aca571f9d114b4f8e /test | |
| parent | 6f728e7b54986b65e02c34978dbc6c2a8205f364 (diff) | |
| download | rabbitmq-server-git-0463c59f046dad645cc4f83b9c2289df755af85a.tar.gz | |
More messages for sync test
Diffstat (limited to 'test')
| -rw-r--r-- | test/eager_sync_SUITE.erl | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/test/eager_sync_SUITE.erl b/test/eager_sync_SUITE.erl index 6be5c29f9a..70d7080269 100644 --- a/test/eager_sync_SUITE.erl +++ b/test/eager_sync_SUITE.erl @@ -23,7 +23,7 @@ -define(QNAME, <<"ha.two.test">>). -define(QNAME_AUTO, <<"ha.auto.test">>). --define(MESSAGE_COUNT, 2000). +-define(MESSAGE_COUNT, 200000). all() -> [ @@ -135,9 +135,11 @@ eager_sync_cancel(Config) -> amqp_channel:call(ACh, #'queue.declare'{queue = ?QNAME, durable = true}), {ok, not_syncing} = sync_cancel(C, ?QNAME), %% Idempotence - eager_sync_cancel_test2(Config, A, B, C, Ch). + eager_sync_cancel_test2(Config, A, B, C, Ch, 100). -eager_sync_cancel_test2(Config, A, B, C, Ch) -> +eager_sync_cancel_test2(_, _, _, _, _, 0) -> + error(no_more_attempts_left); +eager_sync_cancel_test2(Config, A, B, C, Ch, Attempts) -> %% Sync then cancel rabbit_ct_client_helpers:publish(Ch, ?QNAME, ?MESSAGE_COUNT), restart(Config, A), @@ -158,12 +160,12 @@ eager_sync_cancel_test2(Config, A, B, C, Ch) -> %% Damn. Syncing finished between wait_for_syncing/3 and %% sync_cancel/2 above. Start again. amqp_channel:call(Ch, #'queue.purge'{queue = ?QNAME}), - eager_sync_cancel_test2(Config, A, B, C, Ch) + eager_sync_cancel_test2(Config, A, B, C, Ch, Attempts - 1) end; synced_already -> %% Damn. Syncing finished before wait_for_syncing/3. Start again. amqp_channel:call(Ch, #'queue.purge'{queue = ?QNAME}), - eager_sync_cancel_test2(Config, A, B, C, Ch) + eager_sync_cancel_test2(Config, A, B, C, Ch, Attempts - 1) end. eager_sync_auto(Config) -> @@ -273,6 +275,6 @@ state(Node, QName) -> %% in order to pass, because a SyncBatchSize >= ?MESSAGE_COUNT will %% always finish before the test is able to cancel the sync. set_app_sync_batch_size(Node) -> - rabbit_ct_broker_helpers:control_action( + rabbit_control_helper:command( eval, Node, ["application:set_env(rabbit, mirroring_sync_batch_size, 1)."]). |
