timer/test: Use const for constants
Some checks failed
Tests and linters / Run gofumpt (pull_request) Successful in 2m18s
DCO action / DCO (pull_request) Failing after 2m34s
Pre-commit hooks / Pre-commit (pull_request) Successful in 2m51s
Tests and linters / Staticcheck (pull_request) Successful in 4m2s
Tests and linters / gopls check (pull_request) Successful in 4m6s
Build / Build Components (pull_request) Successful in 4m55s
Tests and linters / Lint (pull_request) Successful in 5m4s
Vulncheck / Vulncheck (pull_request) Successful in 5m2s
Tests and linters / Tests (pull_request) Successful in 7m10s
Tests and linters / Tests with -race (pull_request) Successful in 7m12s
Some checks failed
Tests and linters / Run gofumpt (pull_request) Successful in 2m18s
DCO action / DCO (pull_request) Failing after 2m34s
Pre-commit hooks / Pre-commit (pull_request) Successful in 2m51s
Tests and linters / Staticcheck (pull_request) Successful in 4m2s
Tests and linters / gopls check (pull_request) Successful in 4m6s
Build / Build Components (pull_request) Successful in 4m55s
Tests and linters / Lint (pull_request) Successful in 5m4s
Vulncheck / Vulncheck (pull_request) Successful in 5m2s
Tests and linters / Tests (pull_request) Successful in 7m10s
Tests and linters / Tests with -race (pull_request) Successful in 7m12s
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
28b7188ffb
commit
35941babb8
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…
Reference in a new issue