This is an automated email from the ASF dual-hosted git repository.
vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git
The following commit(s) were added to refs/heads/master by this push:
new 207f526 Skip well known flaky tests by default
207f526 is described below
commit 207f526075ae7c5d3ef19aeeb77640b73192673e
Author: Vladimir Sitnikov <[email protected]>
AuthorDate: Mon Mar 23 16:45:46 2020 +0300
Skip well known flaky tests by default
The tests can be run with adding -PenableFlaky or
enableFlaky= to $HOME/.gradle/gradle.properties
---
.../org/apache/jmeter/control/RunTimeSpec.groovy | 2 ++
src/dist-check/build.gradle.kts | 26 +++++++++++++++++++---
2 files changed, 25 insertions(+), 3 deletions(-)
diff --git
a/src/components/src/test/groovy/org/apache/jmeter/control/RunTimeSpec.groovy
b/src/components/src/test/groovy/org/apache/jmeter/control/RunTimeSpec.groovy
index d9dda26..52b6ee2 100644
---
a/src/components/src/test/groovy/org/apache/jmeter/control/RunTimeSpec.groovy
+++
b/src/components/src/test/groovy/org/apache/jmeter/control/RunTimeSpec.groovy
@@ -20,12 +20,14 @@ package org.apache.jmeter.control
import org.apache.jmeter.junit.stubs.TestSampler
import org.apache.jmeter.samplers.Sampler
+import spock.lang.Ignore
import spock.lang.Specification
class RunTimeSpec extends Specification {
def sut = new RunTime()
+ @Ignore("It fails too often due to timing issues")
def "RunTime stops within a tolerance after specified runtime"() {
given:
sut.setRuntime(1)
diff --git a/src/dist-check/build.gradle.kts b/src/dist-check/build.gradle.kts
index 4db18a3..1bacdb1 100644
--- a/src/dist-check/build.gradle.kts
+++ b/src/dist-check/build.gradle.kts
@@ -15,12 +15,14 @@
* limitations under the License.
*/
+import com.github.vlsi.gradle.properties.dsl.props
import java.time.Duration
import org.apache.jmeter.buildtools.batchtest.BatchTest
import org.apache.jmeter.buildtools.batchtest.BatchTestServer
plugins {
jmeterbuild.batchtest
+ id("com.github.vlsi.gradle-extensions")
}
val extraTestDependencies by configurations.creating
@@ -163,9 +165,8 @@ arrayOf(
"Http4ImplDigestAuth",
"BUG_62847",
"HTMLParserTestFile_2",
- "TestResultStatusAction"
- // TestRedirectionPolicies fails too often, so it is disabled
- // "TestRedirectionPolicies"
+ "TestResultStatusAction",
+ "TestRedirectionPolicies"
).map { createBatchTestTask(it) }
// Certain errors are expected in those tests as they examine failure cases as
well
@@ -233,3 +234,22 @@ tasks.named(JavaPlugin.TEST_TASK_NAME).configure {
// This is a convenience, so batch tests are executed as a part of default
"test" task
dependsOn(batchTests)
}
+
+val flakyTests = listOf(
+ "batchHttp4ImplPreemptiveBasicAuthJava",
+ "batchSlowCharsFeatureHttpClient4",
+ "batchSlowCharsFeatureJava",
+ "batchTestKeepAlive",
+ "batchTestRedirectionPolicies"
+)
+
+if (props.bool("enableFlaky", default = false)) {
+ println("The following tests are known to be flaky as they depend on the
external services: $flakyTests")
+} else {
+ println("Certain tests will be skipped as they depend on external services
and fail too often. Please add -PenableFlaky to enable them: $flakyTests")
+ for (test in flakyTests) {
+ tasks.named(test) {
+ enabled = false
+ }
+ }
+}