jamesfredley commented on code in PR #15654:
URL: https://github.com/apache/grails-core/pull/15654#discussion_r3237407871
##########
gradle/functional-test-config.gradle:
##########
@@ -60,6 +60,7 @@ List<String> debugArguments = [
]
tasks.withType(Test).configureEach { Test task ->
boolean isHibernate5 =
!project.name.startsWith('grails-test-examples-hibernate5')
+ boolean isHibernate7 =
!project.name.startsWith('grails-test-examples-hibernate7')
boolean isMongo = !project.name.startsWith('grails-test-examples-mongodb')
Review Comment:
Shouldn't these be the same as the original - without the `!`?
The new conditions below (lines 76, 80, 84, 88, 92, 96) read as if
`isHibernate5` is TRUE when the project IS a hibernate5 project. But the `!` in
the declarations makes the variables TRUE for *non*-matching projects, so the
new logic is inverted:
- `-PonlyHibernate7Tests` will skip h7 functional tests and run h5/mongo
ones instead of the opposite.
- `-PskipHibernate7Tests` will skip non-h7 tests and run h7 ones.
Easiest fix is dropping the `!` here so the names match reality and the
conditions below read correctly. (The same naming was confusing in the original
h5-only file too, but the original `if (onlyH5) { if (isHibernate5) skip }`
happened to double-negate to the right answer; that's not preserved in the
refactor.)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]