Update fdbcli_tests.py quota test

This commit is contained in:
sfc-gh-tclinkenbeard 2022-10-22 19:37:18 -07:00
parent 2a2d52ca50
commit 78b6779f11
2 changed files with 6 additions and 5 deletions

View File

@ -113,6 +113,7 @@ ACTOR Future<Void> clearQuota(Reference<IDatabase> db, TransactionTag tag) {
try { try {
tr->clear(ThrottleApi::getTagQuotaKey(tag)); tr->clear(ThrottleApi::getTagQuotaKey(tag));
wait(safeThreadFutureToFuture(tr->commit())); wait(safeThreadFutureToFuture(tr->commit()));
fmt::print("Successfully cleared quota.\n");
return Void(); return Void();
} catch (Error& e) { } catch (Error& e) {
wait(safeThreadFutureToFuture(tr->onError(e))); wait(safeThreadFutureToFuture(tr->onError(e)));

View File

@ -109,7 +109,7 @@ def quota(logger):
command = 'quota clear green' command = 'quota clear green'
output = run_fdbcli_command(command) output = run_fdbcli_command(command)
logger.debug(command + ' : ' + output) logger.debug(command + ' : ' + output)
assert output == '' assert output == 'Successfully cleared quota.'
command = 'quota get green total_throughput' command = 'quota get green total_throughput'
output = run_fdbcli_command(command) output = run_fdbcli_command(command)
@ -120,17 +120,17 @@ def quota(logger):
command = 'quota set red total_throughput 49152' command = 'quota set red total_throughput 49152'
output = run_fdbcli_command(command) output = run_fdbcli_command(command)
logger.debug(command + ' : ' + output) logger.debug(command + ' : ' + output)
assert output == '' assert output == 'Successfully updated quota.'
command = 'quota set green total_throughput 32768' command = 'quota set green total_throughput 32768'
output = run_fdbcli_command(command) output = run_fdbcli_command(command)
logger.debug(command + ' : ' + output) logger.debug(command + ' : ' + output)
assert output == '' assert output == 'Successfully updated quota.'
command = 'quota set green reserved_throughput 16384' command = 'quota set green reserved_throughput 16384'
output = run_fdbcli_command(command) output = run_fdbcli_command(command)
logger.debug(command + ' : ' + output) logger.debug(command + ' : ' + output)
assert output == '' assert output == 'Successfully updated quota.'
command = 'quota get green total_throughput' command = 'quota get green total_throughput'
output = run_fdbcli_command(command) output = run_fdbcli_command(command)
@ -145,7 +145,7 @@ def quota(logger):
command = 'quota clear green' command = 'quota clear green'
output = run_fdbcli_command(command) output = run_fdbcli_command(command)
logger.debug(command + ' : ' + output) logger.debug(command + ' : ' + output)
assert output == '' assert output == 'Successfully cleared quota.'
command = 'quota get green total_throughput' command = 'quota get green total_throughput'
output = run_fdbcli_command(command) output = run_fdbcli_command(command)