Closed tkobayas closed 6 months ago
/take
Generally, the issue is that DRLVisitorImpl doesn't accept 0 size lhsPattern(). But each test may have its own issue (e.g. AnnotationsTest seems to have an annotation parsing issue)
I confirm that.
org.drools.mvel.integrationtests.AnnotationsTest#testAnnotationOnLHSAndMerging
(#5918)org.drools.mvel.integrationtests.ExtendsTest#testExtendsBasic
(#5917)are not the best examples as they test correct DRL sources and fail due to parser issues. Once we fix the parser grammar, the visitor will be able to traverse the contexts smoothly.
However, the other failing tests are good examples because they test invalid or incomplete DRL sources that do not have a completely parsed LHS. The visitor must be resilient to that and must not throw an exception.
Thank you, @yurloc . I'm working on https://github.com/apache/incubator-kie-drools/issues/5918 now
@yurloc I removed the IllegalStateException: ctx.lhsPattern().size() == 0
by https://github.com/apache/incubator-kie-drools/pull/5922
But DRLIncompleteCodeTest
has remaining errors/failures. I filed https://github.com/apache/incubator-kie-drools/issues/5924 for that.
Now all "Failing tests" in the first description are solved or associated with other issues.
Parent issue
5678
Failing tests
org.drools.mvel.integrationtests.AnnotationsTest#testAnnotationOnLHSAndMerging
org.drools.compiler.integrationtests.drl.DRLTest#testWithInvalidRule2
org.drools.mvel.compiler.lang.DRLIncompleteCodeTest#testIncompleteCode2
org.drools.mvel.compiler.lang.DRLIncompleteCodeTest#testIncompleteCode12
org.drools.mvel.integrationtests.ExtendsTest#testExtendsBasic
Rule code snippet
Generally, the issue is that DRLVisitorImpl doesn't accept 0 size lhsPattern(). But each test may have its own issue (e.g. AnnotationsTest seems to have an annotation parsing issue)
Error output