rust-cli / rust-cli/rexpect

Sporadically failing CI testcases

Open
#104 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
391
Forks
69
Avg merge
1d 34m
Merged PRs (30d)
2

Description

We have some sporadically failing testcases, which blocks CI.
Has been discussed in #101 among other PRs. But I'm opening an issue to keep the discussion in one place.

I'm able to reliably reproduce the failure on my machine like so:

I=1; while cargo nextest run test_read_line; do I=$(($I+1)); echo "PASS $I"; done; echo "FAIL $I"
    Starting 1 tests across 1 binaries (19 skipped)
        FAIL [   0.207s] rexpect session::tests::test_read_line

--- STDOUT:              rexpect session::tests::test_read_line ---

running 1 test
test session::tests::test_read_line ... FAILED

failures:

failures:
    session::tests::test_read_line

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 19 filtered out; finished in 0.21s


--- STDERR:              rexpect session::tests::test_read_line ---
thread 'session::tests::test_read_line' panicked at 'assertion failed: `(left == right)`
  left: `"hans"`,
 right: `"hanshans"`', src/session.rs:437:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

   Canceling due to test failure: 0 tests still running
------------
     Summary [   0.207s] 1 tests run: 0 passed, 1 failed, 19 skipped
        FAIL [   0.207s] rexpect session::tests::test_read_line
error: test run failed
FAIL 270

It failed after 270 runs of the test. I'm running Ubuntu 20.

Contributor guide

Open the contributing guide

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 running the provided cargo nextest loop for session::tests::test_read_line and inspect the failing assertion at src/session.rs:437. Trace the test's behavior around that assertion and use repeated runs to confirm the intermittent result is eliminated, with the test passing reliably in CI.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.