diff --git a/test/runtests.jl b/test/runtests.jl
index ed28a6960ae4171b70054dd96d8cdbea4c157340..66c86a7b0762ae906ec01d6889870ece14b3612e 100644
--- a/test/runtests.jl
+++ b/test/runtests.jl
@@ -99,10 +99,10 @@ end
 
         # COUNT queries have to be conducted manually
         count_transaction = create_transaction()
-        add_query(transaction, "COUNT ENTITY WITH id=-1")
-        execute(transaction)
+        add_query(count_transaction, "COUNT ENTITY WITH id=-1")
+        execute(count_transaction)
         # Still an empty result set
-        @test get_count_result(transaction) == 0
+        @test get_count_result(count_transaction) == 0
     end
 
     @testset "Test entity retrieval" begin