test(bigquery-jdbc): add test tags & ability to skip them - #13916
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for excluding specific test groups or tags via an excludedGroups variable in the Makefile and annotates several integration tests with @Tag("advanced") and @Tag("known_issue"). The review feedback highlights multiple instances in the Makefile where excludedGroups is passed unquoted to $(MAKE) or within Docker arguments. If the variable contains spaces, this will cause word splitting and lead to build or execution failures; wrapping these references in quotes is recommended to ensure robust execution.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request adds support for excluding specific test tags or groups (such as 'advanced' and 'known_issue') during test execution by introducing an excludedGroups variable in the Makefile and tagging various integration tests. The feedback highlights a potential issue where passing an empty -DexcludedGroups parameter to Maven when the variable is unset can cause JUnit 5 to throw an IllegalArgumentException. To resolve this, it is recommended to conditionally define a helper variable in the Makefile so that the property is only passed to Maven when excludedGroups is explicitly provided.
| excludedGroups ?= | ||
| comma := , | ||
| empty := | ||
| space := $(empty) $(empty) |
There was a problem hiding this comment.
Passing an empty -DexcludedGroups="" to Maven Surefire/Failsafe when excludedGroups is not specified (which is the default) can cause JUnit 5 to throw an IllegalArgumentException (e.g., Tag name must not be null or empty or Invalid tag expression).
To prevent this and ensure the default build runs successfully, we can conditionally define a helper variable EXCLUDED_GROUPS_PROP in the Makefile using GNU Make's $(if ...) function, and only pass the -DexcludedGroups property to Maven when excludedGroups is actually set.
excludedGroups ?=
EXCLUDED_GROUPS_PROP = $(if $(excludedGroups),-DexcludedGroups="$(excludedGroups)",)
comma := ,
empty :=
space := $(empty) $(empty)
References
- When replacing a hardcoded default environment variable with a Makefile variable, verify whether an empty or unset value will break the execution, or confirm that the application handles an empty string identically to the default value.
There was a problem hiding this comment.
Verified that it works
No description provided.