Skip to content

Commit

Permalink
tests:bonds: fix flaky resend_igmp test
Browse files Browse the repository at this point in the history
  • Loading branch information
slyon committed Mar 23, 2021
1 parent 6270143 commit abad253
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/integration/bonds.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ def test_bond_mode_balance_rr_pps(self):
self.assertEqual(f.read().strip(), '15')

def test_bond_resend_igmp(self):
self.setup_eth(None)
self.setup_eth(None, False)
self.addCleanup(subprocess.call, ['ip', 'link', 'delete', 'mybond'], stderr=subprocess.DEVNULL)
with open(self.config, 'w') as f:
f.write('''network:
Expand All @@ -318,18 +318,18 @@ def test_bond_resend_igmp(self):
match: {name: %(e2c)s}
bonds:
mybond:
addresses: [192.168.9.9/24]
interfaces: [ethbn, ethb2]
parameters:
mode: balance-rr
mii-monitor-interval: 50s
resend-igmp: 100
dhcp4: yes''' % {'r': self.backend, 'ec': self.dev_e_client, 'e2c': self.dev_e2_client})
''' % {'r': self.backend, 'ec': self.dev_e_client, 'e2c': self.dev_e2_client})
self.generate_and_settle()
self.assert_iface_up(self.dev_e_client,
['master mybond'],
['inet '])
self.assert_iface_up('mybond',
['inet 192.168.5.[0-9]+/24'])
self.assert_iface_up('mybond', ['inet 192.168.9.9/24'])
with open('/sys/class/net/mybond/bonding/slaves') as f:
result = f.read().strip()
self.assertIn(self.dev_e_client, result)
Expand Down

0 comments on commit abad253

Please sign in to comment.