From f9ef8acfe0860cb7b794b2ad8460ca42d8ed901a Mon Sep 17 00:00:00 2001 From: SSOHEB Date: Thu, 13 Aug 2026 18:03:22 +0530 Subject: [PATCH] test(lock): fix SetMax test range Signed-off-by: SSOHEB --- lock/semaphore_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lock/semaphore_test.go b/lock/semaphore_test.go index a061de7..06b56b0 100644 --- a/lock/semaphore_test.go +++ b/lock/semaphore_test.go @@ -227,7 +227,7 @@ func TestSetMax(t *testing.T) { c.Init() al := New("a", &c) al.Lock() - for i := range []int{3, 2, 1, 0, -1, 0, 1, 2, 3} { + for _, i := range []int{3, 2, 1, 0, -1, 0, 1, 2, 3} { al.SetMax(i) if c.sem.Semaphore != i-1 { t.Error("SetMax did not increment the semaphore", c.sem.Semaphore)