bryancall commented on PR #13684: URL: https://github.com/apache/trafficserver/pull/13684#issuecomment-5685590097
Added in b255d770d8. The Copilot re-review called this a non-blocking nit, but it was asking for the one thing that was missing, so it is in. `test_ControlMatcher.cc` covered `UrlMatcher` only. The new case drives the exact sequence: a line that compiles its regex and then fails `Data::Init()`, followed by a line whose own pattern does not compile landing on the same slot. It asserts the second line is rejected, that `num_el` stays at zero, and that the pattern the first line left behind does not match anything. I checked it fails against the code it covers rather than just passing. With the check reverted to `empty()`, three assertions fail: ``` CHECK( matcher.NewEntry(&second_line).failed() ) FAILED CHECK( matcher.num_el == 0 ) FAILED CHECK_FALSE( result.never_cache ) FAILED ``` The last one is the point: the stale pattern is not merely stored, it matches, under the second line's configuration. With the fix, `[ControlMatcher]` is 19 assertions in 4 cases, all passing. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
