From 78b6779f1141a5fe214efe52d1f57e10ef32a60f Mon Sep 17 00:00:00 2001 From: sfc-gh-tclinkenbeard Date: Sat, 22 Oct 2022 19:37:18 -0700 Subject: [PATCH] Update fdbcli_tests.py quota test --- fdbcli/QuotaCommand.actor.cpp | 1 + fdbcli/tests/fdbcli_tests.py | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/fdbcli/QuotaCommand.actor.cpp b/fdbcli/QuotaCommand.actor.cpp index 68fa013836..79d5fa5301 100644 --- a/fdbcli/QuotaCommand.actor.cpp +++ b/fdbcli/QuotaCommand.actor.cpp @@ -113,6 +113,7 @@ ACTOR Future clearQuota(Reference db, TransactionTag tag) { try { tr->clear(ThrottleApi::getTagQuotaKey(tag)); wait(safeThreadFutureToFuture(tr->commit())); + fmt::print("Successfully cleared quota.\n"); return Void(); } catch (Error& e) { wait(safeThreadFutureToFuture(tr->onError(e))); diff --git a/fdbcli/tests/fdbcli_tests.py b/fdbcli/tests/fdbcli_tests.py index 9dc159cf19..d4451f9f8d 100755 --- a/fdbcli/tests/fdbcli_tests.py +++ b/fdbcli/tests/fdbcli_tests.py @@ -109,7 +109,7 @@ def quota(logger): command = 'quota clear green' output = run_fdbcli_command(command) logger.debug(command + ' : ' + output) - assert output == '' + assert output == 'Successfully cleared quota.' command = 'quota get green total_throughput' output = run_fdbcli_command(command) @@ -120,17 +120,17 @@ def quota(logger): command = 'quota set red total_throughput 49152' output = run_fdbcli_command(command) logger.debug(command + ' : ' + output) - assert output == '' + assert output == 'Successfully updated quota.' command = 'quota set green total_throughput 32768' output = run_fdbcli_command(command) logger.debug(command + ' : ' + output) - assert output == '' + assert output == 'Successfully updated quota.' command = 'quota set green reserved_throughput 16384' output = run_fdbcli_command(command) logger.debug(command + ' : ' + output) - assert output == '' + assert output == 'Successfully updated quota.' command = 'quota get green total_throughput' output = run_fdbcli_command(command) @@ -145,7 +145,7 @@ def quota(logger): command = 'quota clear green' output = run_fdbcli_command(command) logger.debug(command + ' : ' + output) - assert output == '' + assert output == 'Successfully cleared quota.' command = 'quota get green total_throughput' output = run_fdbcli_command(command)