diff options
author | hor911 <hor911@ydb.tech> | 2023-12-06 12:45:18 +0300 |
---|---|---|
committer | hor911 <hor911@ydb.tech> | 2023-12-06 14:00:14 +0300 |
commit | 36e639b1ae3997a626daf4b2800b1a981fc6496b (patch) | |
tree | 34e58ff1cc2bf0c335006a3a1b212e0a38ae7c0a | |
parent | e7fda6595937cda061fdefb21d18d2b1f92a9841 (diff) | |
download | ydb-36e639b1ae3997a626daf4b2800b1a981fc6496b.tar.gz |
Check ABORTED_BY_USER metering
-rw-r--r-- | ydb/tests/fq/s3/test_statistics.py | 15 | ||||
-rw-r--r-- | ydb/tests/tools/fq_runner/kikimr_runner.py | 1 |
2 files changed, 15 insertions, 1 deletions
diff --git a/ydb/tests/fq/s3/test_statistics.py b/ydb/tests/fq/s3/test_statistics.py index 5cb6c2a483..54d30900e5 100644 --- a/ydb/tests/fq/s3/test_statistics.py +++ b/ydb/tests/fq/s3/test_statistics.py @@ -251,3 +251,18 @@ class TestS3(object): assert files_size == ingress_bytes, "Files size {} mistmatches ingress bytes {}".format(files_size, ingress_bytes) assert sum(kikimr.control_plane.get_metering()) == 110 + + @yq_all + @pytest.mark.parametrize("client", [{"folder_id": "my_folder"}], indirect=True) + def test_aborted_by_user(self, kikimr, client): + + sql = R''' +SELECT * FROM AS_TABLE(()->(Yql::ToStream(ListReplicate(<|x: +"0123456789ABCDEF" +|>, 4000000000)))); +''' + query_id = client.create_query("simple", sql, type=fq.QueryContent.QueryType.ANALYTICS).result.query_id + client.wait_query_status(query_id, fq.QueryMeta.RUNNING) + client.abort_query(query_id) + client.wait_query_status(query_id, fq.QueryMeta.ABORTED_BY_USER) + assert sum(kikimr.control_plane.get_metering()) == 10 diff --git a/ydb/tests/tools/fq_runner/kikimr_runner.py b/ydb/tests/tools/fq_runner/kikimr_runner.py index a14fcdf4cd..a7ab18fd0b 100644 --- a/ydb/tests/tools/fq_runner/kikimr_runner.py +++ b/ydb/tests/tools/fq_runner/kikimr_runner.py @@ -600,7 +600,6 @@ class StreamingOverKikimr(object): self.wd = yatest.common.output_path("yq_" + self.uuid) os.mkdir(self.wd) self.fill_config() - self.compute_plane.qs_config['progress_stats_period_ms'] = 1 driver_config = ydb.DriverConfig(os.getenv("YDB_ENDPOINT"), os.getenv("YDB_DATABASE")) self.driver = ydb.Driver(driver_config) try: |