Skip to content

Commit 5ff874e

Browse files
author
Yingjian Wu
committed
wip
1 parent 5712246 commit 5ff874e

File tree

1 file changed

+6
-53
lines changed

1 file changed

+6
-53
lines changed

metacat-functional-tests/build.gradle

Lines changed: 6 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ apply plugin: 'nebula.facet'
2929
facets {
3030
functionalTest {
3131
parentSourceSet = "test"
32-
testTaskName = 'functionalTestWithDifferentDB'
3332
includeInCheckLifecycle = false
3433
}
3534
}
3635

36+
// Explicitly configure the functionalTest source set for clarity and classpath
3737
sourceSets {
3838
functionalTest {
3939
groovy {
@@ -54,23 +54,7 @@ dependencies {
5454
testImplementation project(path: ':metacat-metadata-mysql')
5555
warproject(project(path: ':metacat-war', configuration: 'archives'))
5656

57-
/*******************************
58-
* Compile Dependencies
59-
*******************************/
60-
61-
/*******************************
62-
* Provided Dependencies
63-
*******************************/
64-
65-
/*******************************
66-
* Runtime Dependencies
67-
*******************************/
68-
69-
/*******************************
70-
* Test Dependencies
71-
*******************************/
72-
73-
// Test that metacat-client can be used with jersey 1
57+
// Test dependencies
7458
testImplementation(project(":metacat-common-server"))
7559
testImplementation(project(":metacat-connector-hive"))
7660
testImplementation(project(":metacat-testdata-provider"))
@@ -79,18 +63,16 @@ dependencies {
7963
functionalTestImplementation("org.apache.hive:hive-exec:${hive_version}") {
8064
exclude module: "pentaho-aggdesigner-algorithm"
8165
}
82-
8366
testImplementation("org.skyscreamer:jsonassert")
8467
}
8568

8669
task expandWar(type: Copy) {
8770
dependsOn ':metacat-war:war'
88-
8971
from { configurations.warproject.collect { zipTree(it) } }
9072
into file("${buildDir}/metacat-war-expanded/ROOT")
9173
}
9274

93-
// Aurora configuration tasks
75+
// Aurora cluster setup/teardown and port discovery
9476
task startMetacatClusterAurora(type: Exec) {
9577
dependsOn 'expandWar'
9678
if (project.ext.startCluster) {
@@ -136,19 +118,10 @@ task metacatPortsAurora {
136118
ext.metacat_embedded_fast_hive_thrift_port = get_docker_port('com.netflix.metacat.oss.test.war', 12004)
137119
ext.hive_thrift_port = get_docker_port('com.netflix.metacat.oss.test.hive', 9083)
138120
ext.hive_debug_port = get_docker_port('com.netflix.metacat.oss.test.hive', 8005)
139-
140-
println '++ Container Exposed ports ++'
141-
println '+++ Metacat Web Port: [' + ext.http_port + ']'
142-
println '+++ Metacat Web Debug Port: [' + ext.metacat_http_debug_port + ']'
143-
println '+++ Metacat Hive Thrift Port: [' + ext.metacat_hive_thrift_port + ']'
144-
println '+++ Metacat Embedded Hive Thrift Port: [' + ext.metacat_embedded_hive_thrift_port + ']'
145-
println '+++ Metacat Embedded Fast Hive Thrift Port: [' + ext.metacat_embedded_fast_hive_thrift_port + ']'
146-
println '+++ Metacat Hive Metastore Port: [' + ext.hive_thrift_port + ']'
147-
println '+++ Metacat Hive Metastore Debug Port: [' + ext.hive_debug_port + ']'
148121
}
149122
}
150123

151-
// CRDB configuration tasks
124+
// CRDB cluster setup/teardown and port discovery
152125
task startMetacatClusterCRDB(type: Exec) {
153126
dependsOn 'expandWar'
154127
if (project.ext.startCluster) {
@@ -194,22 +167,12 @@ task metacatPortsCRDB {
194167
ext.metacat_embedded_fast_hive_thrift_port = get_docker_port('com.netflix.metacat.oss.test.war', 12004)
195168
ext.hive_thrift_port = get_docker_port('com.netflix.metacat.oss.test.hive', 9083)
196169
ext.hive_debug_port = get_docker_port('com.netflix.metacat.oss.test.hive', 8005)
197-
198-
println '++ Container Exposed ports ++'
199-
println '+++ Metacat Web Port: [' + ext.http_port + ']'
200-
println '+++ Metacat Web Debug Port: [' + ext.metacat_http_debug_port + ']'
201-
println '+++ Metacat Hive Thrift Port: [' + ext.metacat_hive_thrift_port + ']'
202-
println '+++ Metacat Embedded Hive Thrift Port: [' + ext.metacat_embedded_hive_thrift_port + ']'
203-
println '+++ Metacat Embedded Fast Hive Thrift Port: [' + ext.metacat_embedded_fast_hive_thrift_port + ']'
204-
println '+++ Metacat Hive Metastore Port: [' + ext.hive_thrift_port + ']'
205-
println '+++ Metacat Hive Metastore Debug Port: [' + ext.hive_debug_port + ']'
206170
}
207171
}
208172

209173
// Functional test tasks for Aurora
210174
task functionalTestAurora(type: Test) {
211175
outputs.upToDateWhen { false }
212-
213176
testClassesDirs = sourceSets.functionalTest.output.classesDirs
214177
classpath = sourceSets.functionalTest.runtimeClasspath
215178

@@ -227,20 +190,14 @@ task functionalTestAurora(type: Test) {
227190
}
228191
systemProperties = properties
229192
}
230-
231-
232-
testLogging {
233-
showStandardStreams = true
234-
}
235-
193+
testLogging { showStandardStreams = true }
236194
dependsOn 'expandWar', 'startMetacatClusterAurora', 'metacatPortsAurora'
237195
finalizedBy 'stopMetacatClusterAurora'
238196
}
239197

240198
// Functional test tasks for CRDB
241199
task functionalTestCRDB(type: Test) {
242200
outputs.upToDateWhen { false }
243-
244201
testClassesDirs = sourceSets.functionalTest.output.classesDirs
245202
classpath = sourceSets.functionalTest.runtimeClasspath
246203

@@ -258,11 +215,7 @@ task functionalTestCRDB(type: Test) {
258215
}
259216
systemProperties = properties
260217
}
261-
262-
testLogging {
263-
showStandardStreams = true
264-
}
265-
218+
testLogging { showStandardStreams = true }
266219
dependsOn 'expandWar', 'startMetacatClusterCRDB', 'metacatPortsCRDB'
267220
finalizedBy 'stopMetacatClusterCRDB'
268221
}

0 commit comments

Comments
 (0)