OpenFn / OpenFn/lightning

Spike: Find better solution for Process.sleep() for FailureAlert tests

Open
#693 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Elixir
Stars
296
Forks
86
Avg merge
1d 13h
Merged PRs (30d)
50

Description

Context: Flaky tests are more expensive than slow tests.

What's up:

  1. #689 introduces a 100ms sleep in two places to try to address a persistently flaky test.
  2. Relying on Process.sleep() isn't great because it slows down our tests—in this case by 200ms per run.
  3. But we think it's better than having this test flake once every 15 or 20 runs.

In other words, we've fixed this with Process.sleep for now to mitigate the impact of the flaky test on our devs, but there's gotta be a better solution.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing #689 and the FailureAlert tests that introduced the two 100ms Process.sleep calls. Run those tests repeatedly to understand the flake and locate the sleeps; done means the tests remain reliable without relying on fixed delays and avoid the current 200ms overhead.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir
Domain
testing-qa
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.