Skip to content

flaky console test #1543

@qweeah

Description

@qweeah

What happened in your environment?

Sometimes when running the unit test, the console test might fail unexpectedly with error

> go test -count=20 ./...                                           
...
ok      oras.land/oras/cmd/oras/internal/display/status 0.080s
--- FAIL: TestConsole_OutputTo (0.00s)
    console_test.go:112: OutputTo output error: failed to find "^[8^[[1Ftest string^[[0m\r\n^[[0K" in ""
FAIL
FAIL    oras.land/oras/cmd/oras/internal/display/status/console 0.073s
ok  

What did you expect to happen?

The test should pass

How can we reproduce it?

Run all unit tests with high repetition count, e.g. 20, and it's likely to happen

go test -count=20 ./...            

What is the version of your ORAS CLI?

Main branch build in 5280c67

What is your OS environment?

Ubuntu 24.04

Are you willing to submit PRs to fix it?

  • Yes, I am willing to fix it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageNew issues or PRs to be acknowledged by maintainers

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions