File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
local-build-plugins/src/main
java/org/hibernate/orm/db Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -198,8 +198,6 @@ processTestResources {
198198tasks. withType( Test . class ). each { test ->
199199 test. useJUnitPlatform()
200200
201- test. usesService( project. gradle. sharedServices. registrations. getByName( ' databaseService' ). service )
202-
203201 // Byteman needs this property to be set, https://developer.jboss.org/thread/274997
204202 test. jvmArgs + = [" -Djdk.attach.allowAttachSelf=true" ]
205203
Original file line number Diff line number Diff line change @@ -27,9 +27,13 @@ public void apply(Project project) {
2727 DatabaseService .class ,
2828 spec -> spec .getMaxParallelUsages ().set ( 1 )
2929 );
30+ final String database = (String ) project .getProperties ().get ( "db" );
3031
31- project .getTasks ().withType ( Test .class ).forEach (
32- test -> test .usesService ( databaseServiceProvider )
33- );
32+ // H2 and HSQLDB are in-memory, so there is no sharing that needs to be avoided
33+ if ( database != null && !"h2" .equals ( database ) && !"hsqldb" .equals ( database ) ) {
34+ project .getTasks ().withType ( Test .class ).forEach (
35+ test -> test .usesService ( databaseServiceProvider )
36+ );
37+ }
3438 }
3539}
You can’t perform that action at this time.
0 commit comments