Skip to content

Work around flakeyness of 'save file' UI test

The last UI test, 'test_g_save_file', appears to be unreliable when running on the CI which causes unwanted pipeline failures.

The reason for failure is always related to the file saving, so it could be one of 3 things:

  • empty or missing file, meaning the content of the buffer was not properly saved (which would be a real bug case)
  • slow file writing, meaning the test continues before the file is ready
  • a problem with the interaction between selenium and the file dialog

To mitigate this, add a wait period after file saving to eliminate the slow-writing problem, and retry the test up to 3 times in case of failure (because the pipeline often succeeds, I assume that a failure caused by selenium would not happen 3 times in a row).

If this test continues to be an issue, it should be disabled until a proper fix is found. Other tests do not seem to be a problem.

Merge request reports

Loading