Skip to content

HDDS-9757. Cannot run specific test due to failIfNoSpecifiedTests=true#5653

Merged
adoroszlai merged 1 commit intoapache:masterfrom
adoroszlai:HDDS-9757
Nov 22, 2023
Merged

HDDS-9757. Cannot run specific test due to failIfNoSpecifiedTests=true#5653
adoroszlai merged 1 commit intoapache:masterfrom
adoroszlai:HDDS-9757

Conversation

@adoroszlai
Copy link
Contributor

@adoroszlai adoroszlai commented Nov 21, 2023

What changes were proposed in this pull request?

After HDDS-9741 upgraded Surefire from 3.0.0-M5 to 3.2.2, trying to run specific tests by setting -Dtest in the CLI fails with No tests matching pattern "..." were executed.

Example:

$ mvn -am -pl :hdds-server-scm -Dtest='TestBlockManager' clean test
...
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.2.2:test (default-test) on project hdds-annotation-processing: No tests matching pattern "TestBlockManager" were executed! (Set -Dsurefire.failIfNoSpecifiedTests=false to ignore this error.) 

The problem is that the default value of failIfNoSpecifiedTests was changed to true in 3.0.0-M6 by SUREFIRE-1910.

https://issues.apache.org/jira/browse/HDDS-9757

How was this patch tested?

$ mvn -am -pl :hdds-server-scm -Dtest='TestBlockManager' clean test
...
[INFO] Tests run: 12, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.494 s -- in org.apache.hadoop.hdds.scm.block.TestBlockManager

@adoroszlai adoroszlai self-assigned this Nov 21, 2023
Copy link
Member

@aswinshakil aswinshakil left a comment

Choose a reason for hiding this comment

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

Thanks for the fix @adoroszlai. LGTM

@adoroszlai adoroszlai merged commit 94c6830 into apache:master Nov 22, 2023
@adoroszlai adoroszlai deleted the HDDS-9757 branch November 22, 2023 06:03
@adoroszlai
Copy link
Contributor Author

Thanks @aswinshakil for the review.

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

Successfully merging this pull request may close these issues.

2 participants