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

ISPN-10148 - Improve reported testName #6865

Merged
merged 1 commit into from May 21, 2019

Conversation

diegolovison
Copy link
Contributor

@diegolovison diegolovison commented Apr 25, 2019

This is a generic way to fix the following problems:

org.infinispan.configuration.parsing.UnifiedXmlFileParsingTest#testParseAndConstructUnifiedXmlFile([/home/jenkins/workspace/ispn-testsuite/647d21bf/infinispan/core/target/test-classes/configs/unified/9.4.xml])
org.infinispan.api.APINonTxTest#testLockedStreamActuallyLocks([org.infinispan.api.APINonTxTest$$Lambda$1688/0x0000000100b08440@79ef4571, false])

https://issues.jboss.org/browse/ISPN-10148

@diegolovison
Copy link
Contributor Author

@danberindei ready for review

@galderz
Copy link
Member

galderz commented May 20, 2019

@diegolovison What's the problem you're trying to solve here?

@diegolovison
Copy link
Contributor Author

@galderz
The test name is always reported different to Polarion.
For example:
UnifiedXmlFileParsingTest#testParseAndConstructUnifiedXmlFile([/home/jenkins/workspace/ispn-testsuite/647d21bf/infinispan/core/target/test-classes/configs/unified/9.4.xml]) It contains the full path of the Jenkins workspace. With this PR, it will be reported like UnifiedXmlFileParsingTest#testParseAndConstructUnifiedXmlFile([9.4.xml]). In this case, it always will have the same test name and we can track the test Age on Jenkins as well.
The same applies to APINonTxTest#testLockedStreamActuallyLocks([org.infinispan.api.APINonTxTest$$Lambda$1688/0x0000000100b08440@79ef4571, false]), it always will generate a unique name.

@ryanemerson ryanemerson merged commit b38ee08 into infinispan:master May 21, 2019
Copy link
Member

@danberindei danberindei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, left a comment pending...

if (parameter instanceof Path) {
parameters[i] = ((Path) parameter).getFileName().toString();
} else if (parameter.getClass().getSimpleName().contains("$$Lambda$")) {
parameters[i] = "$$Lambda$";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this going to make all the lambda parameters look identical in the report (assuming we don't ignore them later)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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