masaori335 commented on issue #11917: URL: https://github.com/apache/trafficserver/issues/11917#issuecomment-3148783212
@ysinghc cool! then, you observed running `remap_acl` test took long time. the goal is shorten it. One of my guess is when `Test_remap_acl` is defined it starts and stops ATS every time, that's the overhead. An idea is combining tests and keep ATS running. For example we have 2 tests: ``` test_ip_allow_optional_methods = Test_remap_acl( "Verify add_allow adds an allowed method.", replay_file='remap_acl_get_post_allowed.replay.yaml', ip_allow_content=IP_ALLOW_CONTENT, deactivate_ip_allow=False, acl_behavior_policy=1, acl_configuration='@action=add_allow @src_ip=127.0.0.1 @method=POST', named_acls=[], expected_responses=[200, 200, 403, 403, 403], proxy_protocol=False) test_ip_allow_optional_methods = Test_remap_acl( "Verify add_allow adds allowed methods.", replay_file='remap_acl_get_post_allowed.replay.yaml', ip_allow_content=IP_ALLOW_CONTENT, deactivate_ip_allow=False, acl_behavior_policy=1, acl_configuration='@action=add_allow @src_ip=127.0.0.1 @method=GET @method=POST', named_acls=[], expected_responses=[200, 200, 403, 403, 403], proxy_protocol=False) ``` https://github.com/apache/trafficserver/blob/447a2a01961c4c1896f7a2b6c66eb4aefad07496/tests/gold_tests/remap/remap_acl.test.py#L258C1-L278C26 The difference is `acl_configuration` (and `expected_responses`), so if we can make it list like this, I expect we can reduce the overhead. ``` test_ip_allow_optional_methods = Test_remap_acl( "Verify add_allow adds allowed methods.", replay_file='remap_acl_get_post_allowed.replay.yaml', ip_allow_content=IP_ALLOW_CONTENT, deactivate_ip_allow=False, acl_behavior_policy=1, test_cases=[ ['@action=add_allow @src_ip=127.0.0.1 @method=POST', [200, 200, 403, 403, 403]], ['@action=add_allow @src_ip=127.0.0.1 @method=GET @method=POST'], [200, 200, 403, 403, 403]], named_acls=[], proxy_protocol=False) ``` This change requires - generate remap rules per list like ``` map /test_1/ http://127.0.0.1:8080/ @action=add_allow @src_ip=127.0.0.1 @method=POST map /test_2/ http://127.0.0.1:8080/ @action=add_allow @src_ip=127.0.0.1 @method=GET @method=POST ``` - `remap_acl_get_post_allowed.replay.yaml` needs to make more requests for each remap rules. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@trafficserver.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org