-
Notifications
You must be signed in to change notification settings - Fork 74
Expand file tree
/
Copy pathbuild.gradle
More file actions
executable file
·74 lines (62 loc) · 3.43 KB
/
build.gradle
File metadata and controls
executable file
·74 lines (62 loc) · 3.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/*
* Copyright (c) 2010-2025 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
*/
dependencies {
testImplementation project(':marklogic-client-api')
testImplementation "jakarta.xml.bind:jakarta.xml.bind-api:4.0.5"
testImplementation 'org.skyscreamer:jsonassert:1.5.3'
testImplementation 'org.slf4j:slf4j-api:2.0.17'
testImplementation 'commons-io:commons-io:2.21.0'
testImplementation "com.squareup.okhttp3:okhttp:${okhttpVersion}"
testImplementation "com.fasterxml.jackson.core:jackson-core:${jacksonVersion}"
testImplementation "com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}"
testImplementation "org.jdom:jdom2:2.0.6.1"
testImplementation 'org.apache.commons:commons-lang3:3.20.0'
testImplementation "com.marklogic:ml-app-deployer:6.2-SNAPSHOT"
testImplementation "ch.qos.logback:logback-classic:${logbackVersion}"
testImplementation "org.junit.jupiter:junit-jupiter:${junitVersion}"
testImplementation 'org.xmlunit:xmlunit-legacy:2.11.0'
// Without this, once using JUnit 5.12 or higher, Gradle will not find any tests and report an error of:
// org.junit.platform.commons.JUnitException: TestEngine with ID 'junit-jupiter' failed to discover tests
testRuntimeOnly "org.junit.platform:junit-platform-launcher:${junitVersion}"
}
tasks.withType(Test).configureEach {
useJUnitPlatform()
// For use in testing TestDatabaseClientKerberosFromFile
systemProperty "keytabFile", System.getProperty("keytabFile")
systemProperty "principal", System.getProperty("principal")
systemProperty "TEST_USE_REVERSE_PROXY_SERVER", testUseReverseProxyServer
}
tasks.register("runFragileTests", Test) {
description = "These are called 'fragile' because they'll pass when run by themselves, but when run as part of the " +
"full suite, there seem to be one or more other fast functional tests that run before them and cause some of " +
"their test methods to break. The Jenkinsfile thus calls these first before running the other functional " +
"tests."
testClassesDirs = sourceSets.test.output.classesDirs
classpath = sourceSets.test.runtimeClasspath
include "com/marklogic/client/fastfunctest/TestQueryOptionBuilder.class"
include "com/marklogic/client/fastfunctest/TestRawCombinedQuery.class"
include "com/marklogic/client/fastfunctest/TestRawStructuredQuery.class"
}
tasks.register("runFastFunctionalTests", Test) {
description = "Run all fast functional tests that don't setup/teardown custom app servers / databases"
testClassesDirs = sourceSets.test.output.classesDirs
classpath = sourceSets.test.runtimeClasspath
include "com/marklogic/client/fastfunctest/**"
// Exclude the "fragile" ones
exclude "com/marklogic/client/fastfunctest/TestQueryOptionBuilder.class"
exclude "com/marklogic/client/fastfunctest/TestRawCombinedQuery.class"
exclude "com/marklogic/client/fastfunctest/TestRawStructuredQuery.class"
}
tasks.register("runSlowFunctionalTests", Test) {
description = "Run slow functional tests; i.e. those that setup/teardown custom app servers / databases"
testClassesDirs = sourceSets.test.output.classesDirs
classpath = sourceSets.test.runtimeClasspath
include "com/marklogic/client/datamovement/functionaltests/**"
include "com/marklogic/client/functionaltest/**"
}
tasks.register("runFunctionalTests") {
dependsOn(runFragileTests, runFastFunctionalTests, runSlowFunctionalTests)
}
runFastFunctionalTests.mustRunAfter runFragileTests
runSlowFunctionalTests.mustRunAfter runFastFunctionalTests