Skip to content

Commit 1fcee16

Browse files
author
Josh Bailey
committed
Fix group_id check.
1 parent 4e32bb1 commit 1fcee16

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

clib/mininet_test_base.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -750,21 +750,16 @@ def get_matching_flow(self, match, timeout=10, table_id=None,
750750
cookie=cookie)
751751

752752
def get_group_id_for_matching_flow(self, match, timeout=10, table_id=None):
753-
group_id = None
754753
for _ in range(timeout):
755754
flow_dict = self.get_matching_flow(
756755
match, timeout=timeout, table_id=table_id)
757756
if flow_dict:
758757
for action in flow_dict['actions']:
759758
if action.startswith('GROUP'):
760759
_, group_id = action.split(':')
761-
group_id = int(group_id)
762-
break
760+
return int(group_id)
763761
time.sleep(1)
764-
self.assertTrue(
765-
group_id,
766-
msg='Cannot find group_id for matching flow %s' % match)
767-
return group_id
762+
return None
768763

769764
def matching_flow_present_on_dpid(self, dpid, match, timeout=10, table_id=None,
770765
actions=None, match_exact=None, hard_timeout=0,
@@ -1941,6 +1936,7 @@ def wait_for_route_as_flow(self, nexthop, prefix, vlan_vid=None, timeout=10,
19411936
if with_group_table:
19421937
group_id = self.get_group_id_for_matching_flow(
19431938
nw_dst_match)
1939+
self.assertTrue(group_id)
19441940
self.wait_matching_in_group_table(
19451941
nexthop_action, group_id, timeout)
19461942
else:

tests/faucet_mininet_test_unit.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5503,9 +5503,6 @@ class FaucetGroupTableUntaggedIPv4RouteTest(FaucetUntaggedTest):
55035503
- route:
55045504
ip_dst: "10.0.2.0/24"
55055505
ip_gw: "10.0.0.2"
5506-
- route:
5507-
ip_dst: "10.0.3.0/24"
5508-
ip_gw: "10.0.0.2"
55095506
"""
55105507
CONFIG = """
55115508
arp_neighbor_timeout: 2
@@ -5539,7 +5536,6 @@ def test_untagged(self):
55395536
self.swap_host_macs(first_host, second_host)
55405537

55415538

5542-
@unittest.skip('group table routing unreliable')
55435539
class FaucetGroupTableUntaggedIPv6RouteTest(FaucetUntaggedTest):
55445540

55455541
CONFIG_GLOBAL = """
@@ -5554,9 +5550,6 @@ class FaucetGroupTableUntaggedIPv6RouteTest(FaucetUntaggedTest):
55545550
- route:
55555551
ip_dst: "fc00::20:0/112"
55565552
ip_gw: "fc00::1:2"
5557-
- route:
5558-
ip_dst: "fc00::30:0/112"
5559-
ip_gw: "fc00::1:2"
55605553
"""
55615554

55625555
CONFIG = """

0 commit comments

Comments
 (0)