-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[new-parser] Tests using wrong duration attribute format #5937
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Parent issue
Failing tests
org.drools.compiler.integrationtests.CepEspTest#testPropertyReactiveWithDurationOnRule
org.drools.compiler.integrationtests.TimerAndCalendarWithPseudoTimeTest#testNoProtocolIntervalTimer
Notes
I'm not 100% but it seems that these tests are wrong and the new parser is failing correctly. I've searched for occurrences in Drools code base and it seems that the following two alternative formats are allowed:
duration 100
- no parentheses, integer number assumed to be millisecondsduration (1m30s)
orduration(P1M)
- parentheses and a time literal (either "human-friendly" or ISO 8601 duration) (to be implemented by [new-parser] Support ISO 8601 format for duration attribute's value #5938).I think the reason why these tests do not fail with the old parser is that the old parser treats the expression inside parentheses as a "chunk" whereas the new parser goes into more detail so it is more sensitive.
Rule code snippet
and
Error output
and
The text was updated successfully, but these errors were encountered: