Reduce number of routers created in ``test_gateway_chassis_rebalance``
This patch reduces the number of routers created in ``test_gateway_chassis_rebalance``. For the test purposes, 5 routers is enough, reduce the test executing time and the OVN load. This patch also captures the "Port_Binding" update event in the ``WaitForCrLrpPortBindingEvent`` class. Related-Bug: #2007353 Change-Id: I66b39b1d0dccfbb18bec5646d8954eee8c687f0c
This commit is contained in:
parent
c178c28fb8
commit
1e41558851
|
@ -30,7 +30,7 @@ class WaitForCrLrpPortBindingEvent(event.RowEvent):
|
|||
self.logical_port_events = collections.defaultdict(threading.Event)
|
||||
self.timeout = timeout
|
||||
super(WaitForCrLrpPortBindingEvent, self).__init__(
|
||||
(self.ROW_CREATE,), 'Port_Binding', None)
|
||||
(self.ROW_CREATE, self.ROW_UPDATE), 'Port_Binding', None)
|
||||
|
||||
def match_fn(self, event, row, old=None):
|
||||
return row.logical_port.startswith(self.PREFIX)
|
||||
|
|
|
@ -541,9 +541,9 @@ class TestRouter(base.TestOVNFunctionalBase):
|
|||
ext1 = self._create_ext_network(
|
||||
'ext1', 'flat', 'physnet4', None, "30.0.0.1", "30.0.0.0/24")
|
||||
gw_info = {'network_id': ext1['network']['id']}
|
||||
# Tries to create 20 routers with a gateway. Since we're using
|
||||
# Tries to create 5 routers with a gateway. Since we're using
|
||||
# physnet4, the chassis candidates will be chassis4 initially.
|
||||
num_routers = 20
|
||||
num_routers = 5
|
||||
for i in range(num_routers):
|
||||
try:
|
||||
router = self._create_router('router%d' % i, gw_info=gw_info)
|
||||
|
|
Loading…
Reference in New Issue