Skip to content

Commit 8e4a540

Browse files
committed
Fix tests
1 parent 6ee80dc commit 8e4a540

File tree

2 files changed

+9
-53
lines changed

2 files changed

+9
-53
lines changed

ydb/tests/fq/http_api/test_http_api.py

+6-52
Original file line numberDiff line numberDiff line change
@@ -121,58 +121,12 @@ def test_simple_analitycs_query(self):
121121

122122
def test_empty_query(self):
123123
client = self.create_client()
124-
result = client.create_query()
125-
query_id = result.get("id")
126-
127-
wait_for_query_status(client, query_id, ["FAILED"])
128-
query_json = client.get_query(query_id)
129-
assert normalize_json(query_json) == {
130-
"id": "xxxxxxxxxxxxxxxxxxxx",
131-
"name": "",
132-
"description": "",
133-
"text": "",
134-
"type": "ANALYTICS",
135-
"status": "FAILED",
136-
"issues": {
137-
"message": "{ <main>: Error: Query failed with code ABORTED at ISOTIME subissue: "
138-
"{ <main>: Error: Failed to parse query subissue: "
139-
"{ <main>: Error: Parse Sql subissue: "
140-
"{ <main>:1:0: Error: Unexpected token absence : cannot match to any predicted input... "
141-
"} } } }",
142-
"details": [
143-
{
144-
"message": "Query failed with code ABORTED at ISOTIME",
145-
"severity": "ERROR",
146-
"issues": [
147-
{
148-
"message": "Failed to parse query",
149-
"severity": "ERROR",
150-
"issues": [
151-
{
152-
"message": "Parse Sql",
153-
"severity": "ERROR",
154-
"issues": [
155-
{
156-
"position": {"row": 1},
157-
"message": "Unexpected token absence : cannot match to any predicted input...\u000a",
158-
"end_position": {"row": 1},
159-
"severity": "ERROR",
160-
"issues": []
161-
}
162-
]
163-
}
164-
]
165-
}
166-
]
167-
}
168-
]
169-
},
170-
"meta": {
171-
"finished_at": "ISOTIME",
172-
"started_at": "ISOTIME"
173-
},
174-
"result_sets": []
175-
}
124+
try:
125+
result = client.create_query()
126+
except Exception as e:
127+
assert "\"message\":\"text\'s length is not in [1; 102400]" in e.args[0]
128+
return
129+
assert False
176130

177131
def test_warning(self):
178132
client = self.create_client()

ydb/tests/fq/s3/test_empty.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,6 @@ def test_empty(self, kikimr, client):
1818
client.create_query("simple", "", type=fq.QueryContent.QueryType.ANALYTICS).result.query_id
1919
except FederatedQueryException as e:
2020
assert "message: \"text\\\'s length is not in [1; 102400]" in e.args[0]
21-
pass
21+
return
22+
assert False
23+

0 commit comments

Comments
 (0)