Classes | Functions | Variables
tests.url_map.fault_injection_test Namespace Reference

Classes

class  TestAbortHalf
 
class  TestAlwaysAbort
 
class  TestAlwaysDelay
 
class  TestDelayHalf
 
class  TestNonMatchingFaultInjection
 
class  TestZeroPercentFaultInjection
 

Functions

def _build_fault_injection_route_rule (int abort_percentage=0, int delay_percentage=0)
 
bool _is_supported (skips.TestConfig config)
 
def _wait_until_backlog_cleared (XdsTestClient test_client, int timeout=_BACKLOG_WAIT_TIME_SEC)
 

Variables

int _BACKLOG_WAIT_TIME_SEC = 20
 
int _DELAY_CASE_APPLICATION_TIMEOUT_SEC = 1
 
float _ERROR_TOLERANCE = 0.2
 
 _Lang = skips.Lang
 
int _LENGTH_OF_RPC_SENDING_SEC = 16
 
float _NON_RANDOM_ERROR_TOLERANCE = 0.01
 
int _NUM_RPCS = 10
 
 DumpedXdsConfig = xds_url_map_testcase.DumpedXdsConfig
 
 ExpectedResult = xds_url_map_testcase.ExpectedResult
 
 GcpResourceManager = xds_url_map_testcase.GcpResourceManager
 
 HostRule = xds_url_map_testcase.HostRule
 
 logger = logging.getLogger(__name__)
 
 PathMatcher = xds_url_map_testcase.PathMatcher
 
 RpcTypeEmptyCall = xds_url_map_testcase.RpcTypeEmptyCall
 
 RpcTypeUnaryCall = xds_url_map_testcase.RpcTypeUnaryCall
 
 XdsTestClient = client_app.XdsTestClient
 

Function Documentation

◆ _build_fault_injection_route_rule()

def tests.url_map.fault_injection_test._build_fault_injection_route_rule ( int   abort_percentage = 0,
int   delay_percentage = 0 
)
private

Definition at line 58 of file fault_injection_test.py.

◆ _is_supported()

bool tests.url_map.fault_injection_test._is_supported ( skips.TestConfig  config)
private

Definition at line 121 of file fault_injection_test.py.

◆ _wait_until_backlog_cleared()

def tests.url_map.fault_injection_test._wait_until_backlog_cleared ( XdsTestClient  test_client,
int   timeout = _BACKLOG_WAIT_TIME_SEC 
)
private
Wait until the completed RPC is close to started RPC.

For delay injected test cases, there might be a backlog of RPCs due to slow
initialization of the client. E.g., if initialization took 20s and qps is
25, then there will be a backlog of 500 RPCs. In normal test cases, this is
fine, because RPCs will fail immediately. But for delay injected test cases,
the RPC might linger much longer and affect the stability of test results.

Definition at line 83 of file fault_injection_test.py.

Variable Documentation

◆ _BACKLOG_WAIT_TIME_SEC

int tests.url_map.fault_injection_test._BACKLOG_WAIT_TIME_SEC = 20
private

Definition at line 55 of file fault_injection_test.py.

◆ _DELAY_CASE_APPLICATION_TIMEOUT_SEC

int tests.url_map.fault_injection_test._DELAY_CASE_APPLICATION_TIMEOUT_SEC = 1
private

Definition at line 54 of file fault_injection_test.py.

◆ _ERROR_TOLERANCE

float tests.url_map.fault_injection_test._ERROR_TOLERANCE = 0.2
private

Definition at line 53 of file fault_injection_test.py.

◆ _Lang

tests.url_map.fault_injection_test._Lang = skips.Lang
private

Definition at line 35 of file fault_injection_test.py.

◆ _LENGTH_OF_RPC_SENDING_SEC

int tests.url_map.fault_injection_test._LENGTH_OF_RPC_SENDING_SEC = 16
private

Definition at line 43 of file fault_injection_test.py.

◆ _NON_RANDOM_ERROR_TOLERANCE

float tests.url_map.fault_injection_test._NON_RANDOM_ERROR_TOLERANCE = 0.01
private

Definition at line 48 of file fault_injection_test.py.

◆ _NUM_RPCS

int tests.url_map.fault_injection_test._NUM_RPCS = 10
private

Definition at line 42 of file fault_injection_test.py.

◆ DumpedXdsConfig

tests.url_map.fault_injection_test.DumpedXdsConfig = xds_url_map_testcase.DumpedXdsConfig

Definition at line 30 of file fault_injection_test.py.

◆ ExpectedResult

tests.url_map.fault_injection_test.ExpectedResult = xds_url_map_testcase.ExpectedResult

Definition at line 34 of file fault_injection_test.py.

◆ GcpResourceManager

tests.url_map.fault_injection_test.GcpResourceManager = xds_url_map_testcase.GcpResourceManager

Definition at line 29 of file fault_injection_test.py.

◆ HostRule

tests.url_map.fault_injection_test.HostRule = xds_url_map_testcase.HostRule

Definition at line 27 of file fault_injection_test.py.

◆ logger

tests.url_map.fault_injection_test.logger = logging.getLogger(__name__)

Definition at line 37 of file fault_injection_test.py.

◆ PathMatcher

tests.url_map.fault_injection_test.PathMatcher = xds_url_map_testcase.PathMatcher

Definition at line 28 of file fault_injection_test.py.

◆ RpcTypeEmptyCall

tests.url_map.fault_injection_test.RpcTypeEmptyCall = xds_url_map_testcase.RpcTypeEmptyCall

Definition at line 32 of file fault_injection_test.py.

◆ RpcTypeUnaryCall

tests.url_map.fault_injection_test.RpcTypeUnaryCall = xds_url_map_testcase.RpcTypeUnaryCall

Definition at line 31 of file fault_injection_test.py.

◆ XdsTestClient

tests.url_map.fault_injection_test.XdsTestClient = client_app.XdsTestClient

Definition at line 33 of file fault_injection_test.py.



grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:53