mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-04 14:03:06 +00:00
nodetool: Implement [gs]etcompationthroughput commands
They exist in the original documentation, but are not yet implemented. Now it's possible to do it. Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
This commit is contained in:
19
test/nodetool/test_compaction_throughput.py
Normal file
19
test/nodetool/test_compaction_throughput.py
Normal file
@@ -0,0 +1,19 @@
|
||||
#
|
||||
# Copyright 2024-present ScyllaDB
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#
|
||||
|
||||
from test.nodetool.rest_api_mock import expected_request
|
||||
import pytest
|
||||
|
||||
def test_get_compaction_throughput(nodetool, scylla_only):
|
||||
res = nodetool("getcompactionthroughput", expected_requests = [
|
||||
expected_request("GET", "/storage_service/compaction_throughput", response=0)
|
||||
])
|
||||
assert res.stdout == '0\n'
|
||||
|
||||
def test_set_compaction_throughput(nodetool, scylla_only):
|
||||
nodetool("setcompactionthroughput", "100", expected_requests = [
|
||||
expected_request("POST", "/storage_service/compaction_throughput", params={"value": "100"})
|
||||
])
|
||||
Reference in New Issue
Block a user