mirror of
https://github.com/apple/foundationdb.git
synced 2025-05-15 18:32:18 +08:00
Update fdbcli_tests.py quota test
This commit is contained in:
parent
2a2d52ca50
commit
78b6779f11
@ -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)));
|
||||||
|
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user