Skip to content

Commit c4b7ff4

Browse files
committed
Divide the integration test into parts per storage
1 parent b89e66a commit c4b7ff4

File tree

1 file changed

+54
-8
lines changed

1 file changed

+54
-8
lines changed

core/build.gradle

Lines changed: 54 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ sourceSets {
6767
}
6868
resources.srcDir file('src/integration-test/resources')
6969
}
70-
integrationTestPermission {
70+
integrationTestCassandraPermission {
7171
java {
7272
compileClasspath += main.output + test.output
7373
runtimeClasspath += main.output + test.output
@@ -78,11 +78,29 @@ sourceSets {
7878
include '**/com/scalar/db/storage/cassandra/CassandraEnv.java'
7979
include '**/com/scalar/db/storage/cassandra/CassandraPermissionIntegrationTest.java'
8080
include '**/com/scalar/db/storage/cassandra/CassandraAdminPermissionIntegrationTest.java'
81+
}
82+
resources.srcDir file('src/integration-test/resources')
83+
}
84+
integrationTestDynamoPermission {
85+
java {
86+
compileClasspath += main.output + test.output
87+
runtimeClasspath += main.output + test.output
88+
srcDir file('src/integration-test/java')
89+
include '**/com/scalar/db/common/*.java'
8190
include '**/com/scalar/db/storage/dynamo/DynamoPermissionTestUtils.java'
8291
include '**/com/scalar/db/storage/dynamo/DynamoAdminTestUtils.java'
8392
include '**/com/scalar/db/storage/dynamo/DynamoEnv.java'
8493
include '**/com/scalar/db/storage/dynamo/DynamoPermissionIntegrationTest.java'
8594
include '**/com/scalar/db/storage/dynamo/DynamoAdminPermissionIntegrationTest.java'
95+
}
96+
resources.srcDir file('src/integration-test/resources')
97+
}
98+
integrationTestJdbcPermission {
99+
java {
100+
compileClasspath += main.output + test.output
101+
runtimeClasspath += main.output + test.output
102+
srcDir file('src/integration-test/java')
103+
include '**/com/scalar/db/common/*.java'
86104
include '**/com/scalar/db/storage/jdbc/JdbcPermissionTestUtils.java'
87105
include '**/com/scalar/db/storage/jdbc/JdbcAdminTestUtils.java'
88106
include '**/com/scalar/db/storage/jdbc/JdbcTestUtils.java'
@@ -113,9 +131,15 @@ configurations {
113131
integrationTestMultiStorageImplementation.extendsFrom testImplementation
114132
integrationTestMultiStorageRuntimeOnly.extendsFrom testRuntimeOnly
115133
integrationTestMultiStorageCompileOnly.extendsFrom testCompileOnly
116-
integrationTestPermissionImplementation.extendsFrom testImplementation
117-
integrationTestPermissionRuntimeOnly.extendsFrom testRuntimeOnly
118-
integrationTestPermissionCompileOnly.extendsFrom testCompileOnly
134+
integrationTestCassandraPermissionImplementation.extendsFrom testImplementation
135+
integrationTestCassandraPermissionRuntimeOnly.extendsFrom testRuntimeOnly
136+
integrationTestCassandraPermissionCompileOnly.extendsFrom testCompileOnly
137+
integrationTestDynamoPermissionImplementation.extendsFrom testImplementation
138+
integrationTestDynamoPermissionRuntimeOnly.extendsFrom testRuntimeOnly
139+
integrationTestDynamoPermissionCompileOnly.extendsFrom testCompileOnly
140+
integrationTestJdbcPermissionImplementation.extendsFrom testImplementation
141+
integrationTestJdbcPermissionRuntimeOnly.extendsFrom testRuntimeOnly
142+
integrationTestJdbcPermissionCompileOnly.extendsFrom testCompileOnly
119143
}
120144

121145
dependencies {
@@ -230,11 +254,33 @@ task integrationTestMultiStorage(type: Test) {
230254
}
231255
}
232256

233-
task integrationTestPermission(type: Test) {
234-
description = 'Runs the integration tests that inherit from DistributedStoragePermissionIntegrationTestBase.'
257+
task integrationTestCassandraPermission(type: Test) {
258+
description = 'Runs the integration tests for Cassandra permissions.'
259+
group = 'verification'
260+
testClassesDirs = sourceSets.integrationTestCassandraPermission.output.classesDirs
261+
classpath = sourceSets.integrationTestCassandraPermission.runtimeClasspath
262+
outputs.upToDateWhen { false } // ensures integration tests are run every time when called
263+
options {
264+
systemProperties(System.getProperties().findAll { it.key.toString().startsWith("scalardb") })
265+
}
266+
}
267+
268+
task integrationTestDynamoPermission(type: Test) {
269+
description = 'Runs the integration tests for DynamoDB permissions.'
270+
group = 'verification'
271+
testClassesDirs = sourceSets.integrationTestDynamoPermission.output.classesDirs
272+
classpath = sourceSets.integrationTestDynamoPermission.runtimeClasspath
273+
outputs.upToDateWhen { false } // ensures integration tests are run every time when called
274+
options {
275+
systemProperties(System.getProperties().findAll { it.key.toString().startsWith("scalardb") })
276+
}
277+
}
278+
279+
task integrationTestJdbcPermission(type: Test) {
280+
description = 'Runs the integration tests for JDBC permissions.'
235281
group = 'verification'
236-
testClassesDirs = sourceSets.integrationTestPermission.output.classesDirs
237-
classpath = sourceSets.integrationTestPermission.runtimeClasspath
282+
testClassesDirs = sourceSets.integrationTestJdbcPermission.output.classesDirs
283+
classpath = sourceSets.integrationTestJdbcPermission.runtimeClasspath
238284
outputs.upToDateWhen { false } // ensures integration tests are run every time when called
239285
options {
240286
systemProperties(System.getProperties().findAll { it.key.toString().startsWith("scalardb") })

0 commit comments

Comments
 (0)