Skip to content

flaky CI tests (maybe term.reset related) #5184

@jerch

Description

@jerch

The CI sometimes produces test failures for no obvious reasons. Those failures are not reproducible locally and seem to be more likely, when the CI machine is under heavy load.

Example:
image

Thats from weblinks tests, where all neighboring tests take a moderate time of ~130ms, while one test runs into a timeout. Those tests actually poll for a certain change to happen on the DOM, but for some reason that change never happened.

Our playwright test modules run all in the same page on the same terminal instance, but separate tests by a

  test.beforeEach(async () => {
    await ctx.page.evaluate(`
      window.term.reset();
      window._some_addon?.dispose();
      window._some_addon = new SomeAddon();
      window.term.loadAddon(window._some_addon);
    `);
  });

to reset the terminal and the tested addon to initial state. This raised my suspicion, whether there might be something off with the reset handling here. This is further backed by the fact, that introducing a wait after term.reset solves the issue:

  test.beforeEach(async () => {
    await ctx.page.evaluate(`
      window.term.reset();
      window._linkaddon?.dispose();
    `);
    await timeout(10);
    await ctx.page.evaluate(`
      window._linkaddon = new WebLinksAddon();
      window.term.loadAddon(window._linkaddon);
    `);
  });

Metadata

Metadata

Assignees

Labels

area/buildRegarding the build processtype/bugSomething is misbehavingtype/debtTechnical debt that could slow us down in the long run

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions