Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flaky Tests #69

Open
nothub opened this issue Aug 26, 2024 · 1 comment
Open

Flaky Tests #69

nothub opened this issue Aug 26, 2024 · 1 comment

Comments

@nothub
Copy link

nothub commented Aug 26, 2024

The tests seem to be flaky.

Some times they pass, some times they fail.

I tested like this:

#!/usr/bin/env sh

set -eu

failed=0
total=10

i=1
while [ "$i" -le "${total}" ]; do

    go clean -testcache

    set +e
    go test -v -vet='all' .
    status="$?"
    set -e

    case ${status} in
        0) ;;
        1) failed="$(expr "${failed}" + 1)" ;;
        *)
            echo "Failed with status: $?"
            exit 1
            ;;
    esac

    i=$(expr "$i" + 1)
done

printf "failed %s/%s times\n" "${failed}" "${total}"

Resulting in random failure rates between 3 and 7 times per 10 tests in 10 runs.

@nothub
Copy link
Author

nothub commented Dec 12, 2024

I was able to fix this issue in my fork.
I will file a PR with the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@nothub and others