You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by xy...@apache.org on 2023/10/09 02:35:53 UTC

[pulsar-client-python] branch main updated: Remove useless sleep on test_seek. (#154)

This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-client-python.git


The following commit(s) were added to refs/heads/main by this push:
     new 8d77f74  Remove useless sleep on test_seek. (#154)
8d77f74 is described below

commit 8d77f7404d57dcf492f2c72d695daca566f5f92b
Author: Baodi Shi <ba...@apache.org>
AuthorDate: Mon Oct 9 10:35:47 2023 +0800

    Remove useless sleep on test_seek. (#154)
---
 tests/pulsar_test.py | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/tests/pulsar_test.py b/tests/pulsar_test.py
index d14d39c..067855d 100755
--- a/tests/pulsar_test.py
+++ b/tests/pulsar_test.py
@@ -977,19 +977,16 @@ class PulsarTest(TestCase):
 
         # seek, and after reconnect, expected receive first message.
         consumer.seek(MessageId.earliest)
-        time.sleep(0.5)
         msg = consumer.receive(TM)
         self.assertEqual(msg.data(), b"hello-0")
 
         # seek on messageId
         consumer.seek(ids[50])
-        time.sleep(0.5)
         msg = consumer.receive(TM)
         self.assertEqual(msg.data(), b"hello-51")
 
         # ditto, but seek on timestamp
         consumer.seek(timestamps[42])
-        time.sleep(0.5)
         msg = consumer.receive(TM)
         self.assertEqual(msg.data(), b"hello-42")
 
@@ -1000,7 +997,6 @@ class PulsarTest(TestCase):
 
         # earliest
         reader.seek(MessageId.earliest)
-        time.sleep(0.5)
         msg = reader.read_next(TM)
         self.assertEqual(msg.data(), b"hello-0")
         msg = reader.read_next(TM)
@@ -1008,7 +1004,6 @@ class PulsarTest(TestCase):
 
         # seek on messageId
         reader.seek(ids[33])
-        time.sleep(0.5)
         msg = reader.read_next(TM)
         self.assertEqual(msg.data(), b"hello-34")
         msg = reader.read_next(TM)
@@ -1016,7 +1011,6 @@ class PulsarTest(TestCase):
 
         # seek on timestamp
         reader.seek(timestamps[79])
-        time.sleep(0.5)
         msg = reader.read_next(TM)
         self.assertEqual(msg.data(), b"hello-79")
         msg = reader.read_next(TM)