Skip to content

Commit 88fc8e5

Browse files
authored
Fix race condition in back2back_test for UDP multicast bus (#1349)
* Add debug prints to back2back_test to analyze race condition Might fail if pytest does not print stdout * Update IPv6 back2back test to use interface-local multicast address Under unknown conditions the IPv6 multicast frames sent during the test are reflected back to the sender twice. This causes the test to fail. With this commit, the multicast frames sent during the test are constrained to the local interface to potentially avoid a double reception. * Revert "Add debug prints to back2back_test to analyze race condition" This reverts commit a830c09.
1 parent c1736cc commit 88fc8e5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/back2back_test.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -307,11 +307,12 @@ def test_unique_message_instances(self):
307307
"only supported on Unix systems (but not on Travis CI; and not on macOS at GitHub Actions)",
308308
)
309309
class BasicTestUdpMulticastBusIPv6(Back2BackTestCase):
310+
HOST_LOCAL_MCAST_GROUP_IPv6 = "ff11:7079:7468:6f6e:6465:6d6f:6d63:6173"
310311

311312
INTERFACE_1 = "udp_multicast"
312-
CHANNEL_1 = UdpMulticastBus.DEFAULT_GROUP_IPv6
313+
CHANNEL_1 = HOST_LOCAL_MCAST_GROUP_IPv6
313314
INTERFACE_2 = "udp_multicast"
314-
CHANNEL_2 = UdpMulticastBus.DEFAULT_GROUP_IPv6
315+
CHANNEL_2 = HOST_LOCAL_MCAST_GROUP_IPv6
315316

316317
def test_unique_message_instances(self):
317318
with self.assertRaises(NotImplementedError):

0 commit comments

Comments
 (0)