Fix TestNonMatchingFaultInjection for Python (#26801)

pull/26807/head
Lidi Zheng 4 years ago committed by GitHub
parent d19802d42c
commit 176c77f52d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      tools/run_tests/xds_k8s_test_driver/tests/url_map/fault_injection_test.py

@ -160,6 +160,14 @@ class TestZeroPercentFaultInjection(xds_url_map_testcase.XdsUrlMapTestCase):
class TestNonMatchingFaultInjection(xds_url_map_testcase.XdsUrlMapTestCase):
"""EMPTY_CALL is not fault injected, so it should succeed."""
@staticmethod
def client_init_config(rpc: str, metadata: str):
# Python interop client will stuck if the traffic is slow (in this case,
# 20s injected). The purpose of this test is examining the un-injected
# traffic is not impacted, so it's fine to just send un-injected
# traffic.
return 'EmptyCall', metadata
@staticmethod
def url_map_change(
host_rule: HostRule,
@ -195,9 +203,6 @@ class TestNonMatchingFaultInjection(xds_url_map_testcase.XdsUrlMapTestCase):
'typedPerFilterConfig', {}))
def rpc_distribution_validate(self, test_client: XdsTestClient):
rpc_distribution = self.configure_and_send(test_client,
rpc_types=[RpcTypeEmptyCall],
num_rpcs=_NUM_RPCS)
self.assertRpcStatusCode(test_client,
expected=(ExpectedResult(
rpc_type=RpcTypeEmptyCall,

Loading…
Cancel
Save