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

proposal: testing: Add a way to disable cache for spesific tests #64462

Closed
saberder opened this issue Nov 30, 2023 · 2 comments
Closed

proposal: testing: Add a way to disable cache for spesific tests #64462

saberder opened this issue Nov 30, 2023 · 2 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Proposal
Milestone

Comments

@saberder
Copy link

Proposal Details

Add a way disable test cache for spesific tests (ie. t.NoCache() )
Test are a great way to add some sanity checks while programming for things like:

  • is my dev env sucesfully logging in correctly to an api
  • what is this spesific function currently returning

With cache these usescases get cached and we have to run go clean -testcache every time, and can trick people into thinking that some connection is working, when in reality the function is returning an empty list.
This is preventing us from using vscode golang extention and the play button feature to run spesific tests for these kind of scenarios.
Screenshot from 2023-11-30 11-43-57

ref: #24573 (comment)
if we could do something like t.NoCache() to mark specific tests. Otherwise everyone will just disable cache altogether with -count=1. I run into this problem when I simply changed sql fixture file, so I would like that specific test to run without caching but I would like to cache others.

@gopherbot gopherbot added this to the Proposal milestone Nov 30, 2023
@mauri870 mauri870 added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Nov 30, 2023
@mauri870 mauri870 changed the title proposal: Add a way to disable cache for spesific tests proposal: testing: Add a way to disable cache for spesific tests Nov 30, 2023
@MarvinJWendt
Copy link

MarvinJWendt commented Nov 30, 2023

I like the proposal, but it seems to be a duplicate of #23799 (and #34635, which suggested the same syntax).

@bcmills
Copy link
Contributor

bcmills commented Nov 30, 2023

Duplicate of #23799

@bcmills bcmills marked this as a duplicate of #23799 Nov 30, 2023
@bcmills bcmills closed this as not planned Won't fix, can't repro, duplicate, stale Nov 30, 2023
@golang golang locked and limited conversation to collaborators Nov 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Proposal
Projects
None yet
Development

No branches or pull requests

5 participants