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

quota: add two unit tests for proper enforcement #468

Merged
merged 2 commits into from
Jun 7, 2022

Conversation

bom-d-van
Copy link
Member

The two tests are for covering fixes made in #467.
More specifically, for commit 47f59ba and 653a7f0.

The two tests are for covering fixes made in #467.
More specifically, for commit 47f59ba and 653a7f0.
one of the report stacktraces:

```
==================
WARNING: DATA RACE
Write at 0x00c0212813e0 by goroutine 28:
  github.com/go-graphite/go-carbon/carbonserver.(*trieIndex).applyQuotas()
      /Users/xhu/go/src/github.com/go-graphite/go-carbon/carbonserver/trie.go:1770 +0x580
  github.com/go-graphite/go-carbon/carbonserver.TestTrieQuotaConcurrentApplyAndEnforce.func2()
      /Users/xhu/go/src/github.com/go-graphite/go-carbon/carbonserver/trie_test.go:1500 +0x278

Previous read at 0x00c0212813e0 by goroutine 20:
  github.com/go-graphite/go-carbon/carbonserver.(*trieIndex).throttle()
      /Users/xhu/go/src/github.com/go-graphite/go-carbon/carbonserver/trie.go:2156 +0x228
  github.com/go-graphite/go-carbon/carbonserver.TestTrieQuotaConcurrentApplyAndEnforce()
      /Users/xhu/go/src/github.com/go-graphite/go-carbon/carbonserver/trie_test.go:1525 +0x5e4
  testing.tRunner()
      /opt/homebrew/Cellar/go/1.18.1/libexec/src/testing/testing.go:1439 +0x18c
  testing.(*T).Run.func1()
      /opt/homebrew/Cellar/go/1.18.1/libexec/src/testing/testing.go:1486 +0x44
```
@bom-d-van
Copy link
Member Author

pushed one more commit (502187f) for resolving go test -race bugs: https://github.com/go-graphite/go-carbon/runs/6590273149?check_suite_focus=true

@bom-d-van bom-d-van merged commit 4f781db into master Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant