fix(java): include integration tests for native image testing #720
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
Some background:
We want to run integration tests and unit tests (ending in *ClientTest) with the native profile. For this purpose, we want to ignore any exclusions that take place in other maven-surefire-plugin configurations within the java-shared-config pom or other child poms so that we can explicitly include these tests. However, using
excludedGroups
in java-spanner-jdbc causes the overriding of the exclusion to be ignored. This results in integration tests being skipped in native mode which leads to native-image testing to fail with the message:Test configuration file wasn't found. Make sure that test execution wasn't skipped.
This change replaces the use of
excludedGroups
withexclude
, which allows the the maven-surefire-plugin configuration for thenative
profile to take precedence whenmvn test -P native
is called. Manual testing withmvn test
results in only unit tests being run, therefore showing no change in current behavior for standard Java.Fixes #719 ☕️