mirror of
https://github.com/apache/sqoop.git
synced 2025-05-02 22:19:15 +08:00
SQOOP-3414: Introduce a Gradle build parameter to set the ignoreTestFailures of the test tasks
This closes #59 (Szabolcs Vasas via Boglarka Egyed)
This commit is contained in:
parent
f8fe691e21
commit
6a159ed282
@ -169,6 +169,16 @@ parameter for all the test tasks except +kerberizedTest+:
|
|||||||
./gradlew -DforkEvery.default=30 test
|
./gradlew -DforkEvery.default=30 test
|
||||||
----
|
----
|
||||||
|
|
||||||
|
The https://docs.gradle.org/current/dsl/org.gradle.api.tasks.testing.Test.html#org.gradle.api.tasks.testing.Test:ignoreFailures[ignoreFailures]
|
||||||
|
parameter of the Gradle test tasks is set to +false+ which means that if a Gradle test task fails the gradle
|
||||||
|
process returns with non-zero. In some CI tools (e.g. Jenkins) this will make the status of the job red and not yellow
|
||||||
|
which usually means some more serious issue than a test failure. To change this behavior you can use the
|
||||||
|
+-DignoreTestFailures+ property to set the +ignoreFailures+ parameter for all the test tasks:
|
||||||
|
|
||||||
|
----
|
||||||
|
./gradlew -DignoreTestFailures=true test
|
||||||
|
----
|
||||||
|
|
||||||
=== Third party tests
|
=== Third party tests
|
||||||
|
|
||||||
==== Installing the necessary databases
|
==== Installing the necessary databases
|
||||||
|
@ -96,6 +96,7 @@ configurations.all {
|
|||||||
|
|
||||||
def sqoopThirdPartyLib = System.getProperty("sqoop.thirdparty.lib.dir")
|
def sqoopThirdPartyLib = System.getProperty("sqoop.thirdparty.lib.dir")
|
||||||
def forkEveryDefault = Integer.valueOf(System.getProperty("forkEvery.default", "0"))
|
def forkEveryDefault = Integer.valueOf(System.getProperty("forkEvery.default", "0"))
|
||||||
|
def ignoreTestFailures = Boolean.getBoolean("ignoreTestFailures")
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
if (sqoopThirdPartyLib != null) runtime fileTree(dir: sqoopThirdPartyLib, include: '*.jar')
|
if (sqoopThirdPartyLib != null) runtime fileTree(dir: sqoopThirdPartyLib, include: '*.jar')
|
||||||
@ -352,6 +353,7 @@ tasks.withType(Test) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
forkEvery forkEveryDefault
|
forkEvery forkEveryDefault
|
||||||
|
ignoreFailures ignoreTestFailures
|
||||||
}
|
}
|
||||||
|
|
||||||
task kerberizedTest (type: Test){
|
task kerberizedTest (type: Test){
|
||||||
@ -366,6 +368,7 @@ task kerberizedTest (type: Test){
|
|||||||
includeCategories 'org.apache.sqoop.testcategories.KerberizedTest'
|
includeCategories 'org.apache.sqoop.testcategories.KerberizedTest'
|
||||||
}
|
}
|
||||||
forkEvery 1
|
forkEvery 1
|
||||||
|
ignoreFailures ignoreTestFailures
|
||||||
}
|
}
|
||||||
|
|
||||||
test.finalizedBy(kerberizedTest)
|
test.finalizedBy(kerberizedTest)
|
||||||
|
Loading…
Reference in New Issue
Block a user