1

How to disable Go test caching

 2 years ago
source link: https://dannypsnl.github.io/blog/2018/03/17/cs/how-to-disable-go-test-caching/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Go 的測試有一個很討厭的行為,那就是 test caching,它會儲存測試的結果然後導致失敗沒有被發覺 如果你的 Go 版本是 1.9,你可以嘗試用命令執行測試 參數會取消 test caching 你還有其他選擇,例如,這也會取消 test caching…How to disable Go test caching

Email: [email protected]
GitHub: @dannypsnl
Twitter: @dannypsnl

Programming Language Theory • System Programming

How to disable Go test caching

Go 的測試有一個很討厭的行為,那就是 test caching,它會儲存測試的結果然後導致失敗沒有被發覺

如果你的 Go 版本是 1.9,你可以嘗試用go test -count=1命令執行測試

-count=1參數會取消 test caching

你還有其他選擇,例如GOCACHE=off go test,這也會取消 test caching

期望這個問題可以很快得到解決

author: Lîm Tsú-thuàn/林子篆/Danny

category:cs

tag:golang

Similar Articles

All works in this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
©2022 dannypsnl(林子篆)

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK