1+ from packaging import version
2+
13from arango .exceptions import (
24 AQLCacheClearError ,
35 AQLCacheConfigureError ,
@@ -26,7 +28,7 @@ def test_aql_attributes(db, username):
2628 assert repr (db .aql .cache ) == f"<AQLQueryCache in { db .name } >"
2729
2830
29- def test_aql_query_management (db , bad_db , col , docs ):
31+ def test_aql_query_management (db_version , db , bad_db , col , docs ):
3032 plan_fields = [
3133 "estimatedNrItems" ,
3234 "estimatedCost" ,
@@ -162,7 +164,7 @@ def test_aql_query_management(db, bad_db, col, docs):
162164 assert new_tracking ["track_bind_vars" ] is True
163165 assert new_tracking ["track_slow_queries" ] is True
164166
165- # Kick off some long lasting queries in the background
167+ # Kick off some long- lasting queries in the background
166168 db .begin_async_execution ().aql .execute ("RETURN SLEEP(100)" )
167169 db .begin_async_execution ().aql .execute ("RETURN SLEEP(50)" )
168170
@@ -175,6 +177,8 @@ def test_aql_query_management(db, bad_db, col, docs):
175177 assert "state" in query
176178 assert "bind_vars" in query
177179 assert "runtime" in query
180+ if db_version >= version .parse ("3.11" ):
181+ assert "peak_memory_usage" in query
178182 assert len (queries ) == 2
179183
180184 # Test list queries with bad database
0 commit comments