Browse Source

Make Admin UI tests less flaky #nolog

pull/1298/head
Miguel Grinberg 1 year ago
parent
commit
3ab1f273e2
Failed to extract signature
  1. 2
      src/socketio/base_server.py
  2. 1
      tests/async/test_admin.py
  3. 1
      tests/common/test_admin.py

2
src/socketio/base_server.py

@ -216,8 +216,6 @@ class BaseServer:
# - self.handlers["*"][event]
# - self.handlers["*"]["*"]
handler = None
print(event, namespace)
print(namespace in self.handlers)
if namespace in self.handlers:
if event in self.handlers[namespace]:
handler = self.handlers[namespace][event]

1
tests/async/test_admin.py

@ -296,6 +296,7 @@ class TestAsyncAdmin(unittest.TestCase):
# join and leave
admin_client.emit('join', ('/', 'room', client1.sid))
time.sleep(0.2)
admin_client.emit(
'emit', ('/', 'room', 'foo', {'bar': 'baz'}))
data = client1.receive(timeout=5)

1
tests/common/test_admin.py

@ -271,6 +271,7 @@ class TestAdmin(unittest.TestCase):
# join and leave
admin_client.emit('join', ('/', 'room', client1.sid))
time.sleep(0.2)
admin_client.emit(
'emit', ('/', 'room', 'foo', {'bar': 'baz'}))
data = client1.receive(timeout=5)

Loading…
Cancel
Save