Skip to content

Flaky Tests #69

Open
Open
@nothub

Description

@nothub

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions