Skip to content

Commit 419b0c6

Browse files
Merge pull request #705 from SKaiNET-developers/ci/browser-test-karma-launch-resilience
test(ci): harden Karma browser tests against launch flakiness under allTests
2 parents 673dcbe + 5bc44ce commit 419b0c6

23 files changed

Lines changed: 460 additions & 0 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// SKaiNET: harden Karma browser tests against launch/capture flakiness.
2+
//
3+
// During `./gradlew allTests` many wasmJs/js browser test tasks start a
4+
// ChromeHeadless instance at the same time. On a loaded machine the browser
5+
// can take longer than Karma's defaults to capture or to emit progress, so
6+
// Karma disconnects it ("Disconnected, no message in 30000 ms" /
7+
// "ChromeHeadless was not killed"), ends up discovering zero tests and the
8+
// build fails on Gradle's `failOnNoDiscoveredTests` check — even though the
9+
// tests pass fine when the task runs in isolation.
10+
//
11+
// Generous capture/disconnect/no-activity timeouts plus a few disconnect
12+
// retries make the run wait patiently for a starved browser instead of
13+
// giving up. Kotlin's Gradle plugin merges every *.js here into karma.conf.js.
14+
config.set({
15+
captureTimeout: 120000,
16+
browserDisconnectTimeout: 30000,
17+
browserDisconnectTolerance: 3,
18+
browserNoActivityTimeout: 120000,
19+
pingTimeout: 120000,
20+
});
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// SKaiNET: harden Karma browser tests against launch/capture flakiness.
2+
//
3+
// During `./gradlew allTests` many wasmJs/js browser test tasks start a
4+
// ChromeHeadless instance at the same time. On a loaded machine the browser
5+
// can take longer than Karma's defaults to capture or to emit progress, so
6+
// Karma disconnects it ("Disconnected, no message in 30000 ms" /
7+
// "ChromeHeadless was not killed"), ends up discovering zero tests and the
8+
// build fails on Gradle's `failOnNoDiscoveredTests` check — even though the
9+
// tests pass fine when the task runs in isolation.
10+
//
11+
// Generous capture/disconnect/no-activity timeouts plus a few disconnect
12+
// retries make the run wait patiently for a starved browser instead of
13+
// giving up. Kotlin's Gradle plugin merges every *.js here into karma.conf.js.
14+
config.set({
15+
captureTimeout: 120000,
16+
browserDisconnectTimeout: 30000,
17+
browserDisconnectTolerance: 3,
18+
browserNoActivityTimeout: 120000,
19+
pingTimeout: 120000,
20+
});
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// SKaiNET: harden Karma browser tests against launch/capture flakiness.
2+
//
3+
// During `./gradlew allTests` many wasmJs/js browser test tasks start a
4+
// ChromeHeadless instance at the same time. On a loaded machine the browser
5+
// can take longer than Karma's defaults to capture or to emit progress, so
6+
// Karma disconnects it ("Disconnected, no message in 30000 ms" /
7+
// "ChromeHeadless was not killed"), ends up discovering zero tests and the
8+
// build fails on Gradle's `failOnNoDiscoveredTests` check — even though the
9+
// tests pass fine when the task runs in isolation.
10+
//
11+
// Generous capture/disconnect/no-activity timeouts plus a few disconnect
12+
// retries make the run wait patiently for a starved browser instead of
13+
// giving up. Kotlin's Gradle plugin merges every *.js here into karma.conf.js.
14+
config.set({
15+
captureTimeout: 120000,
16+
browserDisconnectTimeout: 30000,
17+
browserDisconnectTolerance: 3,
18+
browserNoActivityTimeout: 120000,
19+
pingTimeout: 120000,
20+
});
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// SKaiNET: harden Karma browser tests against launch/capture flakiness.
2+
//
3+
// During `./gradlew allTests` many wasmJs/js browser test tasks start a
4+
// ChromeHeadless instance at the same time. On a loaded machine the browser
5+
// can take longer than Karma's defaults to capture or to emit progress, so
6+
// Karma disconnects it ("Disconnected, no message in 30000 ms" /
7+
// "ChromeHeadless was not killed"), ends up discovering zero tests and the
8+
// build fails on Gradle's `failOnNoDiscoveredTests` check — even though the
9+
// tests pass fine when the task runs in isolation.
10+
//
11+
// Generous capture/disconnect/no-activity timeouts plus a few disconnect
12+
// retries make the run wait patiently for a starved browser instead of
13+
// giving up. Kotlin's Gradle plugin merges every *.js here into karma.conf.js.
14+
config.set({
15+
captureTimeout: 120000,
16+
browserDisconnectTimeout: 30000,
17+
browserDisconnectTolerance: 3,
18+
browserNoActivityTimeout: 120000,
19+
pingTimeout: 120000,
20+
});
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// SKaiNET: harden Karma browser tests against launch/capture flakiness.
2+
//
3+
// During `./gradlew allTests` many wasmJs/js browser test tasks start a
4+
// ChromeHeadless instance at the same time. On a loaded machine the browser
5+
// can take longer than Karma's defaults to capture or to emit progress, so
6+
// Karma disconnects it ("Disconnected, no message in 30000 ms" /
7+
// "ChromeHeadless was not killed"), ends up discovering zero tests and the
8+
// build fails on Gradle's `failOnNoDiscoveredTests` check — even though the
9+
// tests pass fine when the task runs in isolation.
10+
//
11+
// Generous capture/disconnect/no-activity timeouts plus a few disconnect
12+
// retries make the run wait patiently for a starved browser instead of
13+
// giving up. Kotlin's Gradle plugin merges every *.js here into karma.conf.js.
14+
config.set({
15+
captureTimeout: 120000,
16+
browserDisconnectTimeout: 30000,
17+
browserDisconnectTolerance: 3,
18+
browserNoActivityTimeout: 120000,
19+
pingTimeout: 120000,
20+
});
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// SKaiNET: harden Karma browser tests against launch/capture flakiness.
2+
//
3+
// During `./gradlew allTests` many wasmJs/js browser test tasks start a
4+
// ChromeHeadless instance at the same time. On a loaded machine the browser
5+
// can take longer than Karma's defaults to capture or to emit progress, so
6+
// Karma disconnects it ("Disconnected, no message in 30000 ms" /
7+
// "ChromeHeadless was not killed"), ends up discovering zero tests and the
8+
// build fails on Gradle's `failOnNoDiscoveredTests` check — even though the
9+
// tests pass fine when the task runs in isolation.
10+
//
11+
// Generous capture/disconnect/no-activity timeouts plus a few disconnect
12+
// retries make the run wait patiently for a starved browser instead of
13+
// giving up. Kotlin's Gradle plugin merges every *.js here into karma.conf.js.
14+
config.set({
15+
captureTimeout: 120000,
16+
browserDisconnectTimeout: 30000,
17+
browserDisconnectTolerance: 3,
18+
browserNoActivityTimeout: 120000,
19+
pingTimeout: 120000,
20+
});
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// SKaiNET: harden Karma browser tests against launch/capture flakiness.
2+
//
3+
// During `./gradlew allTests` many wasmJs/js browser test tasks start a
4+
// ChromeHeadless instance at the same time. On a loaded machine the browser
5+
// can take longer than Karma's defaults to capture or to emit progress, so
6+
// Karma disconnects it ("Disconnected, no message in 30000 ms" /
7+
// "ChromeHeadless was not killed"), ends up discovering zero tests and the
8+
// build fails on Gradle's `failOnNoDiscoveredTests` check — even though the
9+
// tests pass fine when the task runs in isolation.
10+
//
11+
// Generous capture/disconnect/no-activity timeouts plus a few disconnect
12+
// retries make the run wait patiently for a starved browser instead of
13+
// giving up. Kotlin's Gradle plugin merges every *.js here into karma.conf.js.
14+
config.set({
15+
captureTimeout: 120000,
16+
browserDisconnectTimeout: 30000,
17+
browserDisconnectTolerance: 3,
18+
browserNoActivityTimeout: 120000,
19+
pingTimeout: 120000,
20+
});
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// SKaiNET: harden Karma browser tests against launch/capture flakiness.
2+
//
3+
// During `./gradlew allTests` many wasmJs/js browser test tasks start a
4+
// ChromeHeadless instance at the same time. On a loaded machine the browser
5+
// can take longer than Karma's defaults to capture or to emit progress, so
6+
// Karma disconnects it ("Disconnected, no message in 30000 ms" /
7+
// "ChromeHeadless was not killed"), ends up discovering zero tests and the
8+
// build fails on Gradle's `failOnNoDiscoveredTests` check — even though the
9+
// tests pass fine when the task runs in isolation.
10+
//
11+
// Generous capture/disconnect/no-activity timeouts plus a few disconnect
12+
// retries make the run wait patiently for a starved browser instead of
13+
// giving up. Kotlin's Gradle plugin merges every *.js here into karma.conf.js.
14+
config.set({
15+
captureTimeout: 120000,
16+
browserDisconnectTimeout: 30000,
17+
browserDisconnectTolerance: 3,
18+
browserNoActivityTimeout: 120000,
19+
pingTimeout: 120000,
20+
});
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// SKaiNET: harden Karma browser tests against launch/capture flakiness.
2+
//
3+
// During `./gradlew allTests` many wasmJs/js browser test tasks start a
4+
// ChromeHeadless instance at the same time. On a loaded machine the browser
5+
// can take longer than Karma's defaults to capture or to emit progress, so
6+
// Karma disconnects it ("Disconnected, no message in 30000 ms" /
7+
// "ChromeHeadless was not killed"), ends up discovering zero tests and the
8+
// build fails on Gradle's `failOnNoDiscoveredTests` check — even though the
9+
// tests pass fine when the task runs in isolation.
10+
//
11+
// Generous capture/disconnect/no-activity timeouts plus a few disconnect
12+
// retries make the run wait patiently for a starved browser instead of
13+
// giving up. Kotlin's Gradle plugin merges every *.js here into karma.conf.js.
14+
config.set({
15+
captureTimeout: 120000,
16+
browserDisconnectTimeout: 30000,
17+
browserDisconnectTolerance: 3,
18+
browserNoActivityTimeout: 120000,
19+
pingTimeout: 120000,
20+
});
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// SKaiNET: harden Karma browser tests against launch/capture flakiness.
2+
//
3+
// During `./gradlew allTests` many wasmJs/js browser test tasks start a
4+
// ChromeHeadless instance at the same time. On a loaded machine the browser
5+
// can take longer than Karma's defaults to capture or to emit progress, so
6+
// Karma disconnects it ("Disconnected, no message in 30000 ms" /
7+
// "ChromeHeadless was not killed"), ends up discovering zero tests and the
8+
// build fails on Gradle's `failOnNoDiscoveredTests` check — even though the
9+
// tests pass fine when the task runs in isolation.
10+
//
11+
// Generous capture/disconnect/no-activity timeouts plus a few disconnect
12+
// retries make the run wait patiently for a starved browser instead of
13+
// giving up. Kotlin's Gradle plugin merges every *.js here into karma.conf.js.
14+
config.set({
15+
captureTimeout: 120000,
16+
browserDisconnectTimeout: 30000,
17+
browserDisconnectTolerance: 3,
18+
browserNoActivityTimeout: 120000,
19+
pingTimeout: 120000,
20+
});

0 commit comments

Comments
 (0)