-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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: how to disable (run test) Cached #24573
Comments
The Go project does not use its bug tracker for general discussion or asking questions about the language. The Github bug tracker is only used for tracking bugs and proposals going through the Proposal Process. Please see the Questions wiki page; it has a list of good places for asking questions. But as a quick pointer, the Go 1.10 release notes discuss how to disable test caching (and indeed when caching kicks in in the first place): |
Thanks for the reply, I found the reason and the solution. |
On go1.10
|
go test -count=1
… On 1 Jun 2018, at 17:55, zyfdegh ***@***.***> wrote:
On go1.10
GOCACHE=off go test
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Using go1.11 So I am using |
https://golang.org/doc/go1.10#test Is there any documentation on the |
https://golang.org/cmd/go/#hdr-Testing_flags or
|
In vscode |
Paths names starting with '..' are triggering errors when using Go modules in Go >= 1.11 (1). To work around this we move the testdata into an archive which is unzipped as part of the test. (1) See: golang/go#24573
GOCACHE=off is too strong (prevents reusing binaries) and is going to break when updating to Go 1.12.x. Better use the `-count=1` trick to force a re-run of the tests (golang/go#24573 (comment)).
GOCACHE=off is too strong (prevents reusing binaries) and is going to break when updating to Go 1.12.x. Better use the `-count=1` trick to force a re-run of the tests (golang/go#24573 (comment)).
Can't say |
Just arrived at this thread. Is a Something that wouldn't force people to google "go test no cache" |
+1 @pedromss Just landed here after I was intuitively trying |
Paths names starting with '..' are triggering errors when using Go modules in Go >= 1.11 (1). To work around this we move the testdata into an archive which is unzipped as part of the test. (1) See: golang/go#24573
Paths names starting with '..' are triggering errors when using Go modules in Go >= 1.11 (1). To work around this we move the testdata into an archive which is unzipped as part of the test. (1) See: golang/go#24573
any chance this can be reopened? |
@EnchanterIO @pedromss @tj @myitcv @lengocgiang @franciscocpg @davecheney @imkos please upvote the above issue |
@ghostsquad be patient, please. There is no need to mention everyone. |
my apologies |
I think the best would be if we could do something like |
What version of Go are you using (
go version
)?1.10 (win10_x64)
go test, The results always appear cached.
I made an HTTP request, the result of the server return was changed, but the test results were old.
However, run test (cached) does not make HTTP requests
Unless, I modified the code in func Test_** (), the result is the latest
server code:
go test -v -timeout 30s newpay_svc -run ^Test_gotest_cached$
"hello!" => "hello world!" , but the test results were old.
The text was updated successfully, but these errors were encountered: