[jboss-jira] [JBoss JIRA] (DROOLS-5069) md5Hash results with line endings \r\n on MaterializedLambda tests on Windows
Daniel Rosa (Jira)
issues at jboss.org
Fri Feb 14 07:52:00 EST 2020
Daniel Rosa created DROOLS-5069:
-----------------------------------
Summary: md5Hash results with line endings \r\n on MaterializedLambda tests on Windows
Key: DROOLS-5069
URL: https://issues.redhat.com/browse/DROOLS-5069
Project: Drools
Issue Type: Bug
Affects Versions: 7.33.0.Final
Reporter: Daniel Rosa
Assignee: Mario Fusco
Attachments: materialized_lambda_hash.patch, materialized_lambda_jenkins_output.pdf
Several testes are failing on org.drools.modelcompiler.util.lambdareplace package due the md5Hash function called on className method on classes which extend MatarializedLamda class because Windows consider \r\n as line endings. So the md5Hash results different hashcodes than the expected on assertions.
If there is any customer's use case related to this usage, I believe that the software should deal with the compatibility between different operating systems.
If the hash isn't stored and computed only on runtime, the test approch might be changed to compute the hash on the same way it is in production instead of loading it from stored files. Or a different solution might stood up.
Failing tests:
* MaterializedLambdaPredicateTest.createClassWithOneParameter
* MaterializedLambdaPredicateTest.createClassWithTwoParameters
* MaterializedLambdaExtractorTest.createExtractor
* MaterializedLambdaConsequenceTest.createConsequence
* ExecModelLambdaPostProcessorTest.convertFlowLambdaDoNotConvertConsequenceWhenDrools
* ExecModelLambdaPostProcessorTest.convertPatternLambda
If the \r is removed when calling md5Hash function, all testes pass. See the attachment [materialized_lambda_hash.patch].
Stacktrace here: https://gist.github.com/hellowdan/fc1ceb5b640239a4f284c980540eeaca
or see the attached file [materialized_lambda_jenkins_output.pdf] for the full output.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
More information about the jboss-jira
mailing list