Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

Fix flaky tests #644

@campoy

Description

@campoy

Currently there's tests that fail occasionally, I think this might be because of dependence on the network to fetch resources.

Example from a job:

FAIL: <autogenerated>:26: ReceivePackSuite.TestAdvertisedReferencesNotExists
/home/travis/gopath/src/gopkg.in/src-d/go-git.v4/plumbing/transport/test/receive_pack.go:45:
    c.Assert(err, Equals, transport.ErrRepositoryNotFound)
... obtained *url.Error = &url.Error{Op:"Get", URL:"http://localhost:37003/non-existent.git/info/refs?service=git-receive-pack", Err:(*net.OpError)(0xc420010550)} ("Get http://localhost:37003/non-existent.git/info/refs?service=git-receive-pack: dial tcp 127.0.0.1:37003: getsockopt: connection refused")
... expected *errors.errorString = &errors.errorString{s:"repository not found"} ("repository not found")

I wonder if this should be fixed by faking the network (stubbing http.Get) or by simply retrying failing tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions