From 035b9149e02ecda0c09af04f5034bf64e468e9cb Mon Sep 17 00:00:00 2001 From: weiminyu Date: Tue, 15 Jan 2019 12:04:14 -0800 Subject: [PATCH] Reenable Test Executor sharing in Gradle build Combining all tests in one suite and drop the forkEvery=1 directive. Issue was fixed by [] and [] TESTED=Run locally with maxParallelForks =1 and 5, and tested on travis with maxParallelForks=5 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=229414759 --- gradle/core/build.gradle | 54 +--------------------------------------- 1 file changed, 1 insertion(+), 53 deletions(-) diff --git a/gradle/core/build.gradle b/gradle/core/build.gradle index a7ffd3e60..3ab9df3ef 100644 --- a/gradle/core/build.gradle +++ b/gradle/core/build.gradle @@ -6,30 +6,6 @@ plugins { // used for easy inspection. def generatedDir = "${project.buildDir}/generated/source/custom/main" -// Tests that conflict with (mostly unidentified) members of the main test -// suite. It is unclear if they are offenders (i.e., those that pollute global -// state) or victims. -// TODO(weiminyu): identify cause and fix offending tests. -def outcastTestPatterns = [ - "google/registry/batch/DeleteContactsAndHostsActionTest.*", - "google/registry/batch/RefreshDnsOnHostRenameActionTest.*", - "google/registry/flows/CheckApiActionTest.*", - "google/registry/flows/EppLifecycleHostTest.*", - "google/registry/flows/domain/DomainCreateFlowTest.*", - "google/registry/flows/domain/DomainUpdateFlowTest.*", - "google/registry/tools/CreateDomainCommandTest.*", - "google/registry/tools/server/CreatePremiumListActionTest.*", - // Conflicts with WhoisActionTest - "google/registry/whois/WhoisHttpActionTest.*", -] - -// Tests that conflict with members of both the main test suite and the -// outcast suite. -// TODO(weiminyu): identify cause and fix offending tests. -def fragileTestPatterns = [ - "google/registry/cron/TldFanoutActionTest.*" -] - sourceSets { main { java { @@ -428,41 +404,13 @@ artifacts { testRuntime testJar } -task fragileTest(type: Test) { - // Common exclude pattern. See README in parent directory for explanation. - exclude "**/*TestCase.*", "**/*TestSuite.*" - include fragileTestPatterns - - // Run every test class in a freshly started process. - forkEvery 1 - - // Uncomment to see test outputs in stdout. - //testLogging.showStandardStreams = true -} - -task outcastTest(type: Test) { - // Common exclude pattern. See README in parent directory for explanation. - exclude "**/*TestCase.*", "**/*TestSuite.*" - include outcastTestPatterns - - // Sets the maximum number of test executors that may exist at the same time. - maxParallelForks 5 -} - test { // Common exclude pattern. See README in parent directory for explanation. exclude "**/*TestCase.*", "**/*TestSuite.*" - exclude fragileTestPatterns - exclude outcastTestPatterns - - // Run every test class in its own process. - // TODO: Figure out why we need to do this, fix it and then stop doing it. - // This setting makes the build take 35 minutes, without it it takes about 10. - forkEvery 1 // Sets the maximum number of test executors that may exist at the same time. maxParallelForks 5 -}.dependsOn(fragileTest, outcastTest) +} task nomulus(type: Jar) { manifest {