[#1507] timer/test: Use const for constants
All checks were successful
DCO action / DCO (pull_request) Successful in 4m0s
Vulncheck / Vulncheck (pull_request) Successful in 3m50s
Pre-commit hooks / Pre-commit (pull_request) Successful in 4m38s
Tests and linters / Staticcheck (pull_request) Successful in 4m44s
Tests and linters / Run gofumpt (pull_request) Successful in 4m54s
Tests and linters / gopls check (pull_request) Successful in 5m26s
Build / Build Components (pull_request) Successful in 5m39s
Tests and linters / Tests with -race (pull_request) Successful in 5m45s
Tests and linters / Lint (pull_request) Successful in 6m30s
Tests and linters / Tests (pull_request) Successful in 7m2s
All checks were successful
DCO action / DCO (pull_request) Successful in 4m0s
Vulncheck / Vulncheck (pull_request) Successful in 3m50s
Pre-commit hooks / Pre-commit (pull_request) Successful in 4m38s
Tests and linters / Staticcheck (pull_request) Successful in 4m44s
Tests and linters / Run gofumpt (pull_request) Successful in 4m54s
Tests and linters / gopls check (pull_request) Successful in 5m26s
Build / Build Components (pull_request) Successful in 5m39s
Tests and linters / Tests with -race (pull_request) Successful in 5m45s
Tests and linters / Lint (pull_request) Successful in 6m30s
Tests and linters / Tests (pull_request) Successful in 7m2s
Make it easy to see what the test is about. Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
a8faee7faf
commit
a8f6454e2c
1 changed files with 2 additions and 2 deletions
|
@ -18,7 +18,7 @@ func tickN(t *timer.BlockTimer, n uint32) {
|
|||
// "resetting" consists of ticking the current height as well and invoking `Reset`.
|
||||
func TestIRBlockTimer_Reset(t *testing.T) {
|
||||
var baseCounter [2]int
|
||||
blockDur := uint32(3)
|
||||
const blockDur = uint32(3)
|
||||
|
||||
bt1 := timer.NewBlockTimer(
|
||||
func() (uint32, error) { return blockDur, nil },
|
||||
|
@ -82,7 +82,7 @@ func TestBlockTimer_ResetChangeDuration(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestBlockTimer(t *testing.T) {
|
||||
blockDur := uint32(10)
|
||||
const blockDur = uint32(10)
|
||||
baseCallCounter := uint32(0)
|
||||
|
||||
bt := timer.NewBlockTimer(timer.StaticBlockMeter(blockDur), func() {
|
||||
|
|
Loading…
Add table
Reference in a new issue