Skip to content

Commit faa8014

Browse files
committed
JPERF-566: Fix CI flakiness
1 parent 344ac4b commit faa8014

File tree

10 files changed

+44
-40
lines changed

10 files changed

+44
-40
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ build_template: &build_template
1818
key: v1-dependencies-{{ checksum "build.gradle.kts" }}
1919
- run:
2020
command: ./gradlew build
21-
no_output_timeout: 25m
21+
no_output_timeout: 30m
2222
- store_artifacts:
2323
path: ./build/reports/tests
2424
destination: test-reports

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ dependencies {
4545
}.forEach { implementation(it) }
4646
testCompile("org.assertj:assertj-core:3.11.0")
4747
testCompile("com.atlassian.performance.tools:io:[1.0.0,2.0.0)")
48-
testCompile("com.atlassian.performance.tools:docker-infrastructure:0.2.0")
48+
testCompile("com.atlassian.performance.tools:docker-infrastructure:0.3.0")
4949
testCompile("junit:junit:4.12")
5050
}
5151

gradle/dependency-locks/testApiDependenciesMetadata.lockfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This is a Gradle generated file for dependency locking.
22
# Manual edits can break the build and are not advised.
33
# This file is expected to be part of source control.
4-
com.atlassian.performance.tools:docker-infrastructure:0.2.0
4+
com.atlassian.performance.tools:docker-infrastructure:0.3.0
55
com.atlassian.performance.tools:io:1.2.0
66
com.google.code.findbugs:jsr305:1.3.9
77
com.google.code.gson:gson:2.8.2

gradle/dependency-locks/testCompile.lockfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This is a Gradle generated file for dependency locking.
22
# Manual edits can break the build and are not advised.
33
# This file is expected to be part of source control.
4-
com.atlassian.performance.tools:docker-infrastructure:0.2.0
4+
com.atlassian.performance.tools:docker-infrastructure:0.3.0
55
com.atlassian.performance.tools:io:1.2.0
66
com.google.code.findbugs:jsr305:1.3.9
77
com.google.code.gson:gson:2.8.2

gradle/dependency-locks/testCompileClasspath.lockfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Manual edits can break the build and are not advised.
33
# This file is expected to be part of source control.
44
com.atlassian.performance.tools:concurrency:1.0.0
5-
com.atlassian.performance.tools:docker-infrastructure:0.2.0
5+
com.atlassian.performance.tools:docker-infrastructure:0.3.0
66
com.atlassian.performance.tools:io:1.2.0
77
com.atlassian.performance.tools:jvm-tasks:1.0.0
88
com.github.stephenc.jcip:jcip-annotations:1.0-1

gradle/dependency-locks/testImplementationDependenciesMetadata.lockfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Manual edits can break the build and are not advised.
33
# This file is expected to be part of source control.
44
com.atlassian.performance.tools:concurrency:1.0.0
5-
com.atlassian.performance.tools:docker-infrastructure:0.2.0
5+
com.atlassian.performance.tools:docker-infrastructure:0.3.0
66
com.atlassian.performance.tools:io:1.2.0
77
com.atlassian.performance.tools:jvm-tasks:1.0.0
88
com.github.stephenc.jcip:jcip-annotations:1.0-1

gradle/dependency-locks/testRuntime.lockfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This is a Gradle generated file for dependency locking.
22
# Manual edits can break the build and are not advised.
33
# This file is expected to be part of source control.
4-
com.atlassian.performance.tools:docker-infrastructure:0.2.0
4+
com.atlassian.performance.tools:docker-infrastructure:0.3.0
55
com.atlassian.performance.tools:io:1.2.0
66
com.google.code.findbugs:jsr305:1.3.9
77
com.google.code.gson:gson:2.8.2

gradle/dependency-locks/testRuntimeClasspath.lockfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Manual edits can break the build and are not advised.
33
# This file is expected to be part of source control.
44
com.atlassian.performance.tools:concurrency:1.0.0
5-
com.atlassian.performance.tools:docker-infrastructure:0.2.0
5+
com.atlassian.performance.tools:docker-infrastructure:0.3.0
66
com.atlassian.performance.tools:io:1.2.0
77
com.atlassian.performance.tools:jvm-tasks:1.0.0
88
com.github.stephenc.jcip:jcip-annotations:1.0-1

src/test/kotlin/com/atlassian/performance/tools/jiraactions/api/scenario/JiraCoreScenarioIT.kt

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,21 +55,24 @@ class JiraCoreScenarioIT {
5555
override fun remember(memories: Collection<User>) = throw Exception("not implemented")
5656
}
5757

58+
val diagnoses = Paths.get("diagnoses")
5859
val testOutput = JiraCoreFormula.Builder()
5960
.version(version)
60-
.diagnoses(Paths.get("diagnoses"))
61+
.diagnoses(diagnoses)
6162
.build()
6263
.provision()
6364
.use { jira ->
64-
DockerisedChrome().start().use useBrowser@{ browser ->
65-
val driver = browser.driver
66-
return@useBrowser try {
67-
test(driver, jira, actionMeter, userMemory)
68-
} catch (e: Exception) {
69-
WebDriverDiagnostics(driver).diagnose(e)
70-
throw Exception("Testing with WebDriver failed, look for diagnoses", e)
65+
DockerisedChrome(diagnoses.resolve("recordings"))
66+
.start()
67+
.use useBrowser@{ browser ->
68+
val driver = browser.driver
69+
return@useBrowser try {
70+
test(driver, jira, actionMeter, userMemory)
71+
} catch (e: Exception) {
72+
WebDriverDiagnostics(driver).diagnose(e)
73+
throw Exception("Testing with WebDriver failed, look for diagnoses", e)
74+
}
7175
}
72-
}
7376
}
7477

7578
val results = metrics.map { it.result }

src/test/kotlin/com/atlassian/performance/tools/jiraactions/api/scenario/RichTextEditorIT.kt

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -62,41 +62,42 @@ class RichTextEditorIT {
6262
}
6363
}
6464

65+
val diagnoses = Paths.get("diagnoses")
6566
JiraCoreFormula.Builder()
6667
.version(version)
67-
.diagnoses(Paths.get("diagnoses"))
68+
.diagnoses(diagnoses)
6869
.build()
6970
.provision()
7071
.use { jira ->
71-
DockerisedChrome().start().use { browser ->
72-
val webJira = WebJira(
73-
browser.driver,
74-
jira.getUri(),
75-
user.password
76-
)
77-
val logInAction = scenario.getLogInAction(
78-
webJira,
79-
actionMeter,
80-
userMemory
81-
)
82-
val actions = scenario.getActions(
83-
webJira,
84-
SeededRandom(123),
85-
actionMeter
86-
)
87-
88-
logInAction.run()
89-
actions.forEach { action ->
90-
action.run()
72+
DockerisedChrome(diagnoses.resolve("recordings"))
73+
.start()
74+
.use { browser ->
75+
val webJira = WebJira(
76+
browser.driver,
77+
jira.getUri(),
78+
user.password
79+
)
80+
val logInAction = scenario.getLogInAction(
81+
webJira,
82+
actionMeter,
83+
userMemory
84+
)
85+
val actions = scenario.getActions(
86+
webJira,
87+
SeededRandom(123),
88+
actionMeter
89+
)
90+
logInAction.run()
91+
actions.forEach { action ->
92+
action.run()
93+
}
9194
}
92-
}
9395
}
9496

9597
val results = metrics.map { metric ->
9698
metric.result
9799
}
98100
Assertions.assertThat(results).containsOnly(ActionResult.OK)
99-
100101
}
101102
}
102103

0 commit comments

Comments
 (0)