From af30a4adaf5ef7158b2cb09f6da9d2c920484798 Mon Sep 17 00:00:00 2001 From: Kevin Boyer Date: Mon, 17 Jun 2024 08:54:35 -0400 Subject: [PATCH] Make test not flaky --- app/tests/src/db/test_bulk_ops.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/tests/src/db/test_bulk_ops.py b/app/tests/src/db/test_bulk_ops.py index 8b72d14..69ea88d 100644 --- a/app/tests/src/db/test_bulk_ops.py +++ b/app/tests/src/db/test_bulk_ops.py @@ -15,9 +15,14 @@ class Number: num: int +_next_id = 0 + + def get_random_number_object() -> Number: + global _next_id + _next_id += 1 return Number( - id=str(random.randint(1000000, 9999999)), + id=str(_next_id), num=random.randint(1, 10000), )