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

Tests in the root package are too slow #780

Closed
mvdan opened this issue Mar 14, 2018 · 4 comments
Closed

Tests in the root package are too slow #780

mvdan opened this issue Mar 14, 2018 · 4 comments

Comments

@mvdan
Copy link
Contributor

mvdan commented Mar 14, 2018

They should either be made faster (parallel tests, or other fixes), or the slowest should be skipped on testing.Short().

At the moment, this is far from ideal:

$ go test -short
OK: 197 passed
PASS
ok      gopkg.in/src-d/go-git.v4        58.933s

I would have expected 10 seconds at most. Ideally, 2-3 seconds or less.

@mvdan
Copy link
Contributor Author

mvdan commented Mar 14, 2018

Here's another - the tests aren't standard Go, so I can't use out of the box features like test's -v and -run. Is there a reason for that?

@mcuadros
Copy link
Contributor

We want to change it to use asserty, as any other modern development at source{d}. But the current test suite is built on top of gocheck, this decision was made 3yrs ago, when was the default test framework for us, now we have a bunch of tests to change it, so its a lot of work for a little benefit.

@mvdan
Copy link
Contributor Author

mvdan commented Mar 21, 2018

I honestly don't mind whatever test framework is used. But in my opinion, the end result is that regular Go tests are run, so that go test flags like -v and -run are useful. Otherwise, go test is little other than running some arbitrary Go program that fails or succeeds.

@mcuadros
Copy link
Contributor

Yep, but sadly this, flags are "ignored" by gocheck. Since the whole testsuite runs under the same T

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

3 participants