diff --git a/COMPILING.txt b/COMPILING.txt index 348dae0f..f5d7e795 100644 --- a/COMPILING.txt +++ b/COMPILING.txt @@ -169,6 +169,16 @@ parameter for all the test tasks except +kerberizedTest+: ./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 ==== Installing the necessary databases diff --git a/build.gradle b/build.gradle index c7372e83..f0beec99 100644 --- a/build.gradle +++ b/build.gradle @@ -96,6 +96,7 @@ configurations.all { def sqoopThirdPartyLib = System.getProperty("sqoop.thirdparty.lib.dir") def forkEveryDefault = Integer.valueOf(System.getProperty("forkEvery.default", "0")) +def ignoreTestFailures = Boolean.getBoolean("ignoreTestFailures") dependencies { if (sqoopThirdPartyLib != null) runtime fileTree(dir: sqoopThirdPartyLib, include: '*.jar') @@ -352,6 +353,7 @@ tasks.withType(Test) { } forkEvery forkEveryDefault + ignoreFailures ignoreTestFailures } task kerberizedTest (type: Test){ @@ -366,6 +368,7 @@ task kerberizedTest (type: Test){ includeCategories 'org.apache.sqoop.testcategories.KerberizedTest' } forkEvery 1 + ignoreFailures ignoreTestFailures } test.finalizedBy(kerberizedTest)