From 7678f5cadf1a5440b67e4c775f168041c1d2551f Mon Sep 17 00:00:00 2001 From: Erick Pintor Date: Thu, 19 Sep 2024 09:57:05 -0300 Subject: [PATCH] remove sleeps from streaming tests --- tests/integration/test_stream.py | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/tests/integration/test_stream.py b/tests/integration/test_stream.py index 785ab358..4d9be29a 100644 --- a/tests/integration/test_stream.py +++ b/tests/integration/test_stream.py @@ -29,10 +29,6 @@ def thread_fn(): stream_thread = threading.Thread(target=thread_fn) stream_thread.start() - # adds a delay so the thread can open the stream, - # otherwise we could miss some events - time.sleep(0.5) - id = scoped_client.query(fql("Product.create({}).id")).data scoped_client.query(fql("Product.byId(${id})!.delete()", id=id)) scoped_client.query(fql("Product.create({})")) @@ -61,10 +57,6 @@ def thread_fn(): stream_thread = threading.Thread(target=thread_fn) stream_thread.start() - # adds a delay so the thread can open the stream, - # otherwise we could miss some events - time.sleep(0.5) - scoped_client.query(fql("Product.create({})")) scoped_client.query(fql("Product.create({})")) @@ -86,10 +78,6 @@ def thread_fn(): stream_thread = threading.Thread(target=thread_fn) stream_thread.start() - # adds a delay so the thread can open the stream, - # otherwise we could miss some events - time.sleep(0.5) - scoped_client.query(fql("Product.create({foo: 10})")) scoped_client.query(fql("Product.create({foo: 10})")) @@ -154,10 +142,6 @@ def thread_fn(): stream_thread = threading.Thread(target=thread_fn) stream_thread.start() - # adds a delay so the thread can open the stream, - # otherwise we could miss some events - time.sleep(0.5) - scoped_client.query(fql("Product.create({})")) scoped_client.query(fql("Product.create({})")) scoped_client.query(fql("Product.create({})")) @@ -191,10 +175,6 @@ def thread_fn(): stream_thread = threading.Thread(target=thread_fn) stream_thread.start() - # adds a delay so the thread can open the stream, - # otherwise we could miss some events - time.sleep(0.5) - createFour = scoped_client.query(fql("Product.create({})")) stream_thread.join() assert events[0]["txn_ts"] == createTwo.txn_ts @@ -254,10 +234,6 @@ def thread_fn(): stream_thread = threading.Thread(target=thread_fn) stream_thread.start() - # adds a delay so the thread can open the stream, - # otherwise we could miss some events - time.sleep(0.5) - scoped_client.query(fql("Product.create({})")) scoped_client.query(fql("Product.create({})")) scoped_client.query(fql("Product.create({})"))