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

Fix flaky tests #644

Closed
campoy opened this issue Nov 15, 2017 · 0 comments
Closed

Fix flaky tests #644

campoy opened this issue Nov 15, 2017 · 0 comments

Comments

@campoy
Copy link

campoy commented Nov 15, 2017

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.

mcuadros added a commit that referenced this issue Nov 20, 2017
mcuadros added a commit that referenced this issue Nov 20, 2017
mcuadros added a commit that referenced this issue Nov 20, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants