Skip to content
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

Flaky test: org.drools.model.codegen.execmodel.PropertyReactivityTest.testUnwatchWithFieldBindingAndMvel #6112

Closed
Mukta13 opened this issue Oct 4, 2024 · 3 comments

Comments

@Mukta13
Copy link

Mukta13 commented Oct 4, 2024

Ran the command:

 mvn -pl drools-model/drools-model-codegen     edu.illinois:nondex-maven-plugin:2.1.7:nondex      -Dtest=org.drools.model.codegen.execmodel.PropertyReactivityTest#testUnwatchWithFieldBindingAndMvel

Error:

Failures:
[ERROR] PropertyReactivityTest.testUnwatchWithFieldBindingAndMvel:1279->BaseModelTest.getKieSession:106->BaseModelTest.getKieSession:110->BaseModelTest.getKieContainer:114->BaseModelTest.getKieContainer:121->BaseModelTest.createKieBuilder:132->BaseModelTest.createKieBuilder:157 [Message [id=1, level=ERROR, path=src/main/java/defaultpkg/RulesA51EE0A13164704C38D60D78BF02A41BRuleMethods0.java, line=34, column=2989
text=The method execute(Block2<Integer,Person>) in the type ConsequenceBuilder._2<Integer,Person> is not applicable for the arguments (LambdaConsequenceC083F7DD6BFF7A776EC299820C4A9EE0)], Message [id=2, level=ERROR, path=src/main/java/defaultpkg/RulesA51EE0A13164704C38D60D78BF02A41BRuleMethods0.java, line=0, column=0
text=Java source of src/main/java/defaultpkg/RulesA51EE0A13164704C38D60D78BF02A41BRuleMethods0.java in error:

package defaultpkg;

import org.drools.modelcompiler.dsl.pattern.D;
import org.drools.model.Index.ConstraintType;
import org.drools.model.codegen.execmodel.domain.Person;
import static defaultpkg.RulesA51EE0A13164704C38D60D78BF02A41B.*;
import static defaultpkg.RulesA51EE0A13164704C38D60D78BF02A41B.*;

public class RulesA51EE0A13164704C38D60D78BF02A41BRuleMethods0 {

    /**
     * Rule name: R
     */
    public static org.drools.model.Rule rule_R() {
        final org.drools.model.Variable<org.drools.model.codegen.execmodel.domain.Person> var_$p = D.declarationOf(org.drools.model.codegen.execmodel.domain.Person.class,
                                                                                                                   DomainClassesMetadataA51EE0A13164704C38D60D78BF02A41B.org_drools_model_codegen_execmodel_domain_Person_Metadata_INSTANCE,
                                                                                                                   "$p");
        final org.drools.model.Variable<Integer> var_$age = D.declarationOf(Integer.class,
                                                                            "$age");
        final org.drools.model.BitMask mask_$p = org.drools.model.BitMask.getPatternMask(DomainClassesMetadataA51EE0A13164704C38D60D78BF02A41B.org_drools_model_codegen_execmodel_domain_Person_Metadata_INSTANCE,
                                                                                         "age");
        org.drools.model.Rule rule = D.rule("R")
                                      .build(D.pattern(var_$p).expr("GENERATED_61CDB276CC03EF6F1FF15ADD2A71C680",
                                                                    defaultpkg.PB8.LambdaPredicateB835B8609958E704BDFE1E240C22D00F.INSTANCE,
                                                                    D.alphaIndexedBy(int.class,
                                                                                     org.drools.model.Index.ConstraintType.LESS_THAN,
                                                                                     DomainClassesMetadataA51EE0A13164704C38D60D78BF02A41B.org_drools_model_codegen_execmodel_domain_Person_Metadata_INSTANCE.getPropertyIndex("age"),
                                                                                     defaultpkg.P4D.LambdaExtractor4D4CE8E84F445738EA21F2D385A898A2.INSTANCE,
                                                                                     50),
                                                                    D.reactOn("age")).bind(var_$age,
                                                                                           defaultpkg.PDE.LambdaExtractorDEF19EB4FD29A6395B196403C1E91568.INSTANCE,
                                                                                           D.reactOn("age")).watch("!*"),
                                             D.on(var_$age,
                                                  var_$p).execute(defaultpkg.PC0.LambdaConsequenceC083F7DD6BFF7A776EC299820C4A9EE0.INSTANCE));
        return rule;
    }
}

]]
[INFO]
[ERROR] Tests run: 2, Failures: 1, Errors: 0, Skipped: 0

@Mukta13
Copy link
Author

Mukta13 commented Oct 4, 2024

Fix in #6113

@mariofusco
Copy link
Contributor

I cannot reproduce this issue.

@Mukta13
Copy link
Author

Mukta13 commented Oct 17, 2024

Hi. Thanks for the comment. Did you try running:

mvn -pl drools-model/drools-model-codegen edu.illinois:nondex-maven-plugin:2.1.7:nondex -Dtest=org.drools.model.codegen.execmodel.PropertyReactivityTest#testUnwatchWithFieldBindingAndMvel

Did you not see build failures after running this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants