Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion tests/test_aql.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,19 @@ async def test_list_queries(superuser, db, bad_db):
long_running_task = asyncio.create_task(aql.execute("RETURN SLEEP(10)"))
time.sleep(1)

queries = list()
for _ in range(10):
queries = await aql.queries()
if len(queries) > 0:
break
time.sleep(1)

if len(queries) == 0:
warnings.warn("No queries found in the list!")

# Only superuser can list all queries from all databases.
all_queries = await superuser.aql.queries(all_queries=True)
assert len(all_queries) > 0
assert isinstance(all_queries, list)

# Only test no-throws.
_ = await aql.slow_queries()
Expand Down
Loading