Skip to content

Fix flakey Web IDE editor test

Tomas Vik requested to merge 223288-fix-flakey-ide-jest-test into master

What does this MR do?

This MR improves a flakey Web IDE editor test. In a previous MR (!33391 (merged)), we introduced asynchronous tests that were using real timeouts to time promises and test for a complex race condition. The original values of 10ms and 20ms were working well in local development but started failing in CI.

We decided to replace the generic wait at the end of the test (waitUsingRealTimer(20)) with a "smarter" waitForEditorSetup() which waits for editor being set up. The original waitUsingRealTimer(20) did not guarantee that the background processes in our test have finished.

Note: the solution was suggested here: #223288 (comment 365340228)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Closes #223288 (closed)

Edited by Tomas Vik

Merge request reports