Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Hor911 committed Dec 25, 2023
1 parent 6ee80dc commit 8e4a540
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 53 deletions.
58 changes: 6 additions & 52 deletions ydb/tests/fq/http_api/test_http_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,58 +121,12 @@ def test_simple_analitycs_query(self):

def test_empty_query(self):
client = self.create_client()
result = client.create_query()
query_id = result.get("id")

wait_for_query_status(client, query_id, ["FAILED"])
query_json = client.get_query(query_id)
assert normalize_json(query_json) == {
"id": "xxxxxxxxxxxxxxxxxxxx",
"name": "",
"description": "",
"text": "",
"type": "ANALYTICS",
"status": "FAILED",
"issues": {
"message": "{ <main>: Error: Query failed with code ABORTED at ISOTIME subissue: "
"{ <main>: Error: Failed to parse query subissue: "
"{ <main>: Error: Parse Sql subissue: "
"{ <main>:1:0: Error: Unexpected token absence : cannot match to any predicted input... "
"} } } }",
"details": [
{
"message": "Query failed with code ABORTED at ISOTIME",
"severity": "ERROR",
"issues": [
{
"message": "Failed to parse query",
"severity": "ERROR",
"issues": [
{
"message": "Parse Sql",
"severity": "ERROR",
"issues": [
{
"position": {"row": 1},
"message": "Unexpected token absence : cannot match to any predicted input...\u000a",
"end_position": {"row": 1},
"severity": "ERROR",
"issues": []
}
]
}
]
}
]
}
]
},
"meta": {
"finished_at": "ISOTIME",
"started_at": "ISOTIME"
},
"result_sets": []
}
try:
result = client.create_query()
except Exception as e:
assert "\"message\":\"text\'s length is not in [1; 102400]" in e.args[0]
return
assert False

def test_warning(self):
client = self.create_client()
Expand Down
4 changes: 3 additions & 1 deletion ydb/tests/fq/s3/test_empty.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ def test_empty(self, kikimr, client):
client.create_query("simple", "", type=fq.QueryContent.QueryType.ANALYTICS).result.query_id
except FederatedQueryException as e:
assert "message: \"text\\\'s length is not in [1; 102400]" in e.args[0]
pass
return
assert False

0 comments on commit 8e4a540

Please sign in to comment.