-
Notifications
You must be signed in to change notification settings - Fork 261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CTS regression on advanced find tests? #3202
Comments
Thanks for spotting and raising this @cmgrote. |
Can confirm cts ran successfully for the 1.8 release. Looks as if this is a CTS issue (at least initially) so we continue work on this in master only. Not looking as if anything needed for 1.8 (which has already completed distribution) |
@cmgrote I think this is now fixed (by 3228). Please could you verify that it works OK with IGC? |
I should have added that the merged PR temporarily makes the CTS output the escaped regex pattern it uses in each test. Once we are happy that the PR addresses the problem I will remove the verbose logging. |
Looks good now, thanks! |
Great - thanks for testing it. I will generate a further PR to turn off the logging and close this issue when that PR is merged. |
Logging removed in PR #3240 |
There was a recent change to the advanced find tests to run the
.matches()
method against manually-constructed regular expressions that include a dynamically-determined string.Unfortunately, this dynamically-determined string could itself contain regex-meaningful characters (for example:
(
,.
, etc). In particular, when there is a parenthesis involved that does not have a corresponding opening / closing parenthesis, this will result in a regular expression exception; for example:Note that strings (like
qualifiedName
values) could easily contain parentheses, and further if the strings are dynamically truncated there's no guarantee that both the opening and closing parenthesis will be present. (The exception above is thrown by the CTS itself, where the.match()
method is called, rather than from any underlying repository or connector.)@grahamwallis looks like you made the change, and I'm not sure what the surrounding context was for switching to the
.match()
calls from the prior approach, so hoping you'll have ideas on how to resolve? If we need to retain the.match()
, it sounds like we need to either surround the truncated string with a literaliser (\Q
and\E
), or if we actually want to treat the truncated string as a regular expression then you'll probably have to perform some actual magic -- no idea how we can determine whether a randomly-truncated regular expression would itself end up being a well-formed regular expression (?)Final note: this is present in both the 1.8 release as well as master.
The text was updated successfully, but these errors were encountered: