@@ -29,11 +29,11 @@ apply plugin: 'nebula.facet'
29
29
facets {
30
30
functionalTest {
31
31
parentSourceSet = " test"
32
- testTaskName = ' functionalTestWithDifferentDB'
33
32
includeInCheckLifecycle = false
34
33
}
35
34
}
36
35
36
+ // Explicitly configure the functionalTest source set for clarity and classpath
37
37
sourceSets {
38
38
functionalTest {
39
39
groovy {
@@ -54,23 +54,7 @@ dependencies {
54
54
testImplementation project(path : ' :metacat-metadata-mysql' )
55
55
warproject(project(path : ' :metacat-war' , configuration : ' archives' ))
56
56
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
74
58
testImplementation(project(" :metacat-common-server" ))
75
59
testImplementation(project(" :metacat-connector-hive" ))
76
60
testImplementation(project(" :metacat-testdata-provider" ))
@@ -79,18 +63,16 @@ dependencies {
79
63
functionalTestImplementation(" org.apache.hive:hive-exec:${ hive_version} " ) {
80
64
exclude module : " pentaho-aggdesigner-algorithm"
81
65
}
82
-
83
66
testImplementation(" org.skyscreamer:jsonassert" )
84
67
}
85
68
86
69
task expandWar (type : Copy ) {
87
70
dependsOn ' :metacat-war:war'
88
-
89
71
from { configurations. warproject. collect { zipTree(it) } }
90
72
into file(" ${ buildDir} /metacat-war-expanded/ROOT" )
91
73
}
92
74
93
- // Aurora configuration tasks
75
+ // Aurora cluster setup/teardown and port discovery
94
76
task startMetacatClusterAurora (type : Exec ) {
95
77
dependsOn ' expandWar'
96
78
if (project. ext. startCluster) {
@@ -136,19 +118,10 @@ task metacatPortsAurora {
136
118
ext. metacat_embedded_fast_hive_thrift_port = get_docker_port(' com.netflix.metacat.oss.test.war' , 12004 )
137
119
ext. hive_thrift_port = get_docker_port(' com.netflix.metacat.oss.test.hive' , 9083 )
138
120
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 + ' ]'
148
121
}
149
122
}
150
123
151
- // CRDB configuration tasks
124
+ // CRDB cluster setup/teardown and port discovery
152
125
task startMetacatClusterCRDB (type : Exec ) {
153
126
dependsOn ' expandWar'
154
127
if (project. ext. startCluster) {
@@ -194,22 +167,12 @@ task metacatPortsCRDB {
194
167
ext. metacat_embedded_fast_hive_thrift_port = get_docker_port(' com.netflix.metacat.oss.test.war' , 12004 )
195
168
ext. hive_thrift_port = get_docker_port(' com.netflix.metacat.oss.test.hive' , 9083 )
196
169
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 + ' ]'
206
170
}
207
171
}
208
172
209
173
// Functional test tasks for Aurora
210
174
task functionalTestAurora (type : Test ) {
211
175
outputs. upToDateWhen { false }
212
-
213
176
testClassesDirs = sourceSets. functionalTest. output. classesDirs
214
177
classpath = sourceSets. functionalTest. runtimeClasspath
215
178
@@ -227,20 +190,14 @@ task functionalTestAurora(type: Test) {
227
190
}
228
191
systemProperties = properties
229
192
}
230
-
231
-
232
- testLogging {
233
- showStandardStreams = true
234
- }
235
-
193
+ testLogging { showStandardStreams = true }
236
194
dependsOn ' expandWar' , ' startMetacatClusterAurora' , ' metacatPortsAurora'
237
195
finalizedBy ' stopMetacatClusterAurora'
238
196
}
239
197
240
198
// Functional test tasks for CRDB
241
199
task functionalTestCRDB (type : Test ) {
242
200
outputs. upToDateWhen { false }
243
-
244
201
testClassesDirs = sourceSets. functionalTest. output. classesDirs
245
202
classpath = sourceSets. functionalTest. runtimeClasspath
246
203
@@ -258,11 +215,7 @@ task functionalTestCRDB(type: Test) {
258
215
}
259
216
systemProperties = properties
260
217
}
261
-
262
- testLogging {
263
- showStandardStreams = true
264
- }
265
-
218
+ testLogging { showStandardStreams = true }
266
219
dependsOn ' expandWar' , ' startMetacatClusterCRDB' , ' metacatPortsCRDB'
267
220
finalizedBy ' stopMetacatClusterCRDB'
268
221
}
0 commit comments