Skip to content

Commit

Permalink
Fix wait time
Browse files Browse the repository at this point in the history
  • Loading branch information
mraspaud committed Apr 26, 2024
1 parent 24b2c9a commit fb30354
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install -U pytest pytest-cov pyzmq netifaces donfig pytest-reraise
pip install -U pytest pytest-cov pyzmq netifaces-plus donfig pytest-reraise
- name: Install posttroll
run: |
pip install --no-deps -e .
Expand Down
7 changes: 1 addition & 6 deletions posttroll/tests/test_pubsub.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def test_pub_sub_add_rm(multicast_enabled):
time.sleep(.1)
next(sub.recv(.1))
assert len(sub.addresses) == 1
time.sleep(max_age * 2)
time.sleep(max_age * 4)
for msg in sub.recv(.1):
if msg is None:
break
Expand Down Expand Up @@ -209,9 +209,7 @@ def test_pub_address_timeout(self):

def test_pub_suber(self):
"""Test publisher and subscriber."""
from posttroll.message import Message
from posttroll.publisher import get_own_ip
from posttroll.subscriber import Subscriber
pub_address = "tcp://" + str(get_own_ip()) + ":0"
pub = Publisher(pub_address).start()
addr = pub_address[:-1] + str(pub.port_number)
Expand All @@ -234,9 +232,6 @@ def test_pub_suber(self):

def test_pub_sub_ctx_no_nameserver(self):
"""Test publish and subscribe."""
from posttroll.message import Message
from posttroll.publisher import Publish

with Publish("data_provider", 40000, nameservers=False) as pub:
with Subscribe(topics="counter", nameserver=False, addresses=["tcp://127.0.0.1:40000"]) as sub:
assert isinstance(sub, Subscriber)
Expand Down

0 comments on commit fb30354

Please sign in to comment.