]
Luca Molteni updated DROOLS-5065:
---------------------------------
Git Pull Request:
md5Hash results with line endings \r\n on MaterializedLambda tests on
Windows
-----------------------------------------------------------------------------
Key: DROOLS-5065
URL:
https://issues.redhat.com/browse/DROOLS-5065
Project: Drools
Issue Type: Bug
Affects Versions: 7.33.0.Final
Reporter: Daniel Rosa
Assignee: Luca Molteni
Priority: Minor
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.