Merge "Improve test_egress_np_to_service_wo_selectors"
This commit is contained in:
commit
85807e55a9
|
@ -342,10 +342,9 @@ class ServiceWOSelectorsNPScenario(base.BaseKuryrScenarioTest):
|
||||||
start = time.time()
|
start = time.time()
|
||||||
while time.time() - start < TIMEOUT_PERIOD:
|
while time.time() - start < TIMEOUT_PERIOD:
|
||||||
try:
|
try:
|
||||||
time.sleep(1)
|
time.sleep(5)
|
||||||
_, crd_pod_selector, _ = self.get_np_crd_info(np_name,
|
_, _, ready = self.get_np_crd_info(np_name, client_ns_name)
|
||||||
client_ns_name)
|
if ready:
|
||||||
if crd_pod_selector:
|
|
||||||
break
|
break
|
||||||
except kubernetes.client.rest.ApiException as e:
|
except kubernetes.client.rest.ApiException as e:
|
||||||
LOG.info("ApiException ocurred: %s" % e.body)
|
LOG.info("ApiException ocurred: %s" % e.body)
|
||||||
|
@ -355,6 +354,10 @@ class ServiceWOSelectorsNPScenario(base.BaseKuryrScenarioTest):
|
||||||
np_name, KURYR_NETWORK_POLICY_CRD_PLURAL)
|
np_name, KURYR_NETWORK_POLICY_CRD_PLURAL)
|
||||||
raise lib_exc.TimeoutException(msg)
|
raise lib_exc.TimeoutException(msg)
|
||||||
|
|
||||||
|
# Even though the SG rules are up it might still take a moment until
|
||||||
|
# they're enforced.
|
||||||
|
time.sleep(10)
|
||||||
|
|
||||||
# after applying NP, we still should have an access from client to the
|
# after applying NP, we still should have an access from client to the
|
||||||
# service with matched labels,
|
# service with matched labels,
|
||||||
self.assertIn(consts.POD_OUTPUT,
|
self.assertIn(consts.POD_OUTPUT,
|
||||||
|
|
Loading…
Reference in New Issue