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 {
198
198
tasks. withType( Test . class ). each { test ->
199
199
test. useJUnitPlatform()
200
200
201
- test. usesService( project. gradle. sharedServices. registrations. getByName( ' databaseService' ). service )
202
-
203
201
// Byteman needs this property to be set, https://developer.jboss.org/thread/274997
204
202
test. jvmArgs + = [" -Djdk.attach.allowAttachSelf=true" ]
205
203
Original file line number Diff line number Diff line change @@ -27,9 +27,13 @@ public void apply(Project project) {
27
27
DatabaseService .class ,
28
28
spec -> spec .getMaxParallelUsages ().set ( 1 )
29
29
);
30
+ final String database = (String ) project .getProperties ().get ( "db" );
30
31
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
+ }
34
38
}
35
39
}
You can’t perform that action at this time.
0 commit comments