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

cmd/go: test slow/not working #11683

Closed
Thomasdezeeuw opened this issue Jul 12, 2015 · 8 comments
Closed

cmd/go: test slow/not working #11683

Thomasdezeeuw opened this issue Jul 12, 2015 · 8 comments

Comments

@Thomasdezeeuw
Copy link
Contributor

  1. What version of Go are you using (go version)?

go version devel +b6ead9f Tue Jul 7 21:53:11 2015 +0000 windows/amd64

  1. What operating system and processor architecture are you using?

Windows 7 64bit, Intel i7.

  1. What did you do?

Tried to run go test.

  1. What did you expect to see?

Report of the tests. Normally (go 1.4) within two seconds or so.

  1. What did you see instead?

Nothing, after about 30 secs I killed the test and nothing got reported back. Sometimes I get (maybe 1 in 10 times):

exit status 2
FAIL    github.com/Thomasdezeeuw/markdown       15.857s
@ALTree
Copy link
Member

ALTree commented Jul 12, 2015

Tried to run go test.

On what?

(github.com/Thomasdezeeuw/markdown seems to be private)

@ianlancetaylor
Copy link
Contributor

If your tests take a long time to run, then "go test" is going to take a long time run. That is definitely the first thing to investigate.

If you are absolutely certain that the problem is not in your code, then you need to give us a test case we can use to replicate the problem ourselves. Otherwise there is nothing we can do.

@ianlancetaylor ianlancetaylor changed the title cmd/test slow/not working cmd/go: test slow/not working Jul 12, 2015
@ianlancetaylor ianlancetaylor added this to the Unplanned milestone Jul 12, 2015
@Thomasdezeeuw
Copy link
Contributor Author

The code is indeed private at the moment, however normally the tests run fine in under two seconds. But even if the code is problem isn't there a timeout option normally?

@Thomasdezeeuw
Copy link
Contributor Author

Running go test timeout 2s, it correctly timeouts. Could it be that 1.4 had a default timeout and 1.5 doesn't?

@ianlancetaylor
Copy link
Contributor

Both Go 1.4 and 1.5 have a default timeout of 10 minutes. However, I don't how that could be the issue here. You seem to be suggesting that your tests complete quickly with Go 1.4 but sometimes hang with Go 1.5. Look at http://tip.golang.org/doc/go1.5#runtime . Is it possible that your tests or code are depending on a specific goroutine scheduling order?

@ALTree
Copy link
Member

ALTree commented Jul 12, 2015

You could also try to run the test with the race detector on

go test -race

@Thomasdezeeuw
Copy link
Contributor Author

I'm going to close this, running with a timeout is good enough for me.

@trichner
Copy link

In case anyone wonders why 'go test' takes forever (>10s) on a Windows machine with Avast, you might want to disable Avast's DeepScreen, it tries to sandbox the code and analyze your binary.

It took my way too long to figure this out. More details here.

@golang golang locked and limited conversation to collaborators Oct 24, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants