MCPcopy Create free account
hub / github.com/apache/trafficserver / Http2FlowControlTest

Class Http2FlowControlTest

tests/gold_tests/h2/http2_flow_control.test.py:26–329  ·  view source on GitHub ↗

Define an object to test HTTP/2 flow control behavior.

Source from the content-addressed store, hash-verified

24
25
26class Http2FlowControlTest:
27 """Define an object to test HTTP/2 flow control behavior."""
28
29 _replay_file: str = 'http2_flow_control.replay.yaml'
30 _replay_chunked_file: str = 'http2_flow_control_chunked.replay.yaml'
31 _valid_policy_values: List[int] = list(range(0, 3))
32 _flow_control_policy: Optional[int] = None
33 _flow_control_policy_is_malformed: bool = False
34
35 _default_initial_window_size: int = 65535
36 _default_max_concurrent_streams: int = 100
37 _default_flow_control_policy: int = 0
38
39 _dns_counter: int = 0
40 _server_counter: int = 0
41 _ts_counter: int = 0
42 _client_counter: int = 0
43
44 IS_OUTBOUND = True
45 IS_INBOUND = False
46
47 IS_HTTP2_TO_ORIGIN = True
48 IS_HTTP1_TO_ORIGIN = False
49
50 class ServerType(Enum):
51 """Define the type of server to use in a TestRun."""
52
53 HTTP1_CONTENT_LENGTH = 0
54 HTTP1_CHUNKED = 1
55 HTTP2 = 2
56
57 def __init__(
58 self,
59 description: str,
60 initial_window_size: Optional[int] = None,
61 max_concurrent_streams: Optional[int] = None,
62 flow_control_policy: Optional[int] = None):
63 """Declare the various test Processes.
64
65 :param description: A description of the test.
66
67 :param initial_window_size: The value with which to configure the
68 proxy.config.http2.initial_window_size_(in|out) ATS parameter in the
69 records.yaml file. If the paramenter is None, then no window size
70 will be explicitly set and ATS will use the default value.
71
72 :param max_concurrent_streams: The value with which to configure the
73 proxy.config.http2.max_concurrent_streams_(in|out) ATS parameter in the
74 records.yaml file. If the paramenter is None, then no window size
75 will be explicitly set and ATS will use the default value.
76
77 :param flow_control_policy: The value with which to configure the
78 proxy.config.http2.flow_control.policy_(in|out) ATS parameter the
79 records.yaml file. If the paramenter is None, then no policy
80 configuration will be explicitly set and ATS will use the default
81 value.
82 """
83 self._description = description

Callers 1

Calls 2

listFunction · 0.85
rangeFunction · 0.50

Tested by

no test coverage detected