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

UT Race Failing with fakeSBRenewLockSettler #225

Open
karenychen opened this issue May 7, 2024 · 0 comments
Open

UT Race Failing with fakeSBRenewLockSettler #225

karenychen opened this issue May 7, 2024 · 0 comments

Comments

@karenychen
Copy link
Contributor

❯ go test -race ./...
==================
WARNING: DATA RACE
Write at 0x00c000158e18 by goroutine 70:
  github.com/Azure/go-shuttle/v2_test.(*fakeSBRenewLockSettler).RenewMessageLock()
      /Users/karenchen/go/src/go-shuttle/v2/lockrenewer_test.go:34 +0x12c
  github.com/Azure/go-shuttle/v2.(*peekLockRenewer).startPeriodicRenewal()
      /Users/karenchen/go/src/go-shuttle/v2/lockrenewer.go:128 +0x2e8
  github.com/Azure/go-shuttle/v2_test.Test_RenewalHandlerStayIndependentPerMessage.NewRenewLockHandler.func4.1()
      /Users/karenchen/go/src/go-shuttle/v2/lockrenewer.go:61 +0x58

Previous read at 0x00c000158e18 by goroutine 67:
  github.com/Azure/go-shuttle/v2_test.Test_RenewalHandlerStayIndependentPerMessage.func2()
      /Users/karenchen/go/src/go-shuttle/v2/lockrenewer_test.go:96 +0x54
  runtime.call16()
      /usr/local/opt/go/libexec/src/runtime/asm_arm64.s:478 +0x74
  reflect.Value.Call()
      /usr/local/opt/go/libexec/src/reflect/value.go:380 +0x90
  github.com/onsi/gomega/internal.(*AsyncAssertion).buildActualPoller.func3()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/async_assertion.go:325 +0x178
  github.com/onsi/gomega/internal.(*AsyncAssertion).match()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/async_assertion.go:540 +0xadc
  github.com/onsi/gomega/internal.(*Assertion).ToNot()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/assertion.go:68 +0xe4
  github.com/Azure/go-shuttle/v2_test.Test_RenewalHandlerStayIndependentPerMessage.func2()
      /Users/karenchen/go/src/go-shuttle/v2/lockrenewer_test.go:97 +0x1fc
  runtime.call16()
      /usr/local/opt/go/libexec/src/runtime/asm_arm64.s:478 +0x74
  reflect.Value.Call()
      /usr/local/opt/go/libexec/src/reflect/value.go:380 +0x90
  github.com/onsi/gomega/internal.(*AsyncAssertion).buildActualPoller.func3()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/async_assertion.go:325 +0x178
  github.com/onsi/gomega/internal.(*AsyncAssertion).match()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/async_assertion.go:540 +0xadc
  github.com/onsi/gomega/internal.(*Assertion).ToNot()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/assertion.go:68 +0xe4
  github.com/Azure/go-shuttle/v2_test.Test_RenewalHandlerStayIndependentPerMessage.func2()
      /Users/karenchen/go/src/go-shuttle/v2/lockrenewer_test.go:97 +0x1fc
  runtime.call16()
      /usr/local/opt/go/libexec/src/runtime/asm_arm64.s:478 +0x74
  reflect.Value.Call()
      /usr/local/opt/go/libexec/src/reflect/value.go:380 +0x90
  github.com/onsi/gomega/internal.(*AsyncAssertion).buildActualPoller.func3()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/async_assertion.go:325 +0x178
  github.com/onsi/gomega/internal.(*AsyncAssertion).match()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/async_assertion.go:540 +0xadc
  github.com/onsi/gomega/internal.(*Assertion).ToNot()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/assertion.go:68 +0xe4
  github.com/Azure/go-shuttle/v2_test.Test_RenewalHandlerStayIndependentPerMessage.func2()
      /Users/karenchen/go/src/go-shuttle/v2/lockrenewer_test.go:97 +0x1fc
  runtime.call16()
      /usr/local/opt/go/libexec/src/runtime/asm_arm64.s:478 +0x74
  reflect.Value.Call()
      /usr/local/opt/go/libexec/src/reflect/value.go:380 +0x90
  github.com/onsi/gomega/internal.(*AsyncAssertion).buildActualPoller.func3()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/async_assertion.go:325 +0x178
  github.com/onsi/gomega/internal.(*AsyncAssertion).match()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/async_assertion.go:540 +0xadc
  github.com/onsi/gomega/internal.(*Assertion).ToNot()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/assertion.go:68 +0xe4
  github.com/Azure/go-shuttle/v2_test.Test_RenewalHandlerStayIndependentPerMessage.func2()
      /Users/karenchen/go/src/go-shuttle/v2/lockrenewer_test.go:97 +0x1fc
  runtime.call16()
      /usr/local/opt/go/libexec/src/runtime/asm_arm64.s:478 +0x74
  reflect.Value.Call()
      /usr/local/opt/go/libexec/src/reflect/value.go:380 +0x90
  github.com/onsi/gomega/internal.(*AsyncAssertion).buildActualPoller.func3()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/async_assertion.go:325 +0x178
  github.com/onsi/gomega/internal.(*AsyncAssertion).match()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/async_assertion.go:398 +0x1f4
  github.com/onsi/gomega/internal.(*AsyncAssertion).Should()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/async_assertion.go:145 +0xa8
  github.com/Azure/go-shuttle/v2_test.Test_RenewalHandlerStayIndependentPerMessage()
      /Users/karenchen/go/src/go-shuttle/v2/lockrenewer_test.go:101 +0x7fc
  testing.tRunner()
      /usr/local/opt/go/libexec/src/testing/testing.go:1595 +0x1b0
  testing.(*T).Run.func1()
      /usr/local/opt/go/libexec/src/testing/testing.go:1648 +0x40

Goroutine 70 (running) created at:
  github.com/Azure/go-shuttle/v2_test.Test_RenewalHandlerStayIndependentPerMessage.NewRenewLockHandler.func4()
      /Users/karenchen/go/src/go-shuttle/v2/lockrenewer.go:61 +0x370
  github.com/Azure/go-shuttle/v2.HandlerFunc.Handle()
      /Users/karenchen/go/src/go-shuttle/v2/processor.go:49 +0x58
  github.com/Azure/go-shuttle/v2_test.Test_RenewalHandlerStayIndependentPerMessage.func5()
      /Users/karenchen/go/src/go-shuttle/v2/lockrenewer_test.go:90 +0x70

Goroutine 67 (running) created at:
  testing.(*T).Run()
      /usr/local/opt/go/libexec/src/testing/testing.go:1648 +0x5e8
  testing.runTests.func1()
      /usr/local/opt/go/libexec/src/testing/testing.go:2054 +0x80
  testing.tRunner()
      /usr/local/opt/go/libexec/src/testing/testing.go:1595 +0x1b0
  testing.runTests()
      /usr/local/opt/go/libexec/src/testing/testing.go:2052 +0x6e4
  testing.(*M).Run()
      /usr/local/opt/go/libexec/src/testing/testing.go:1925 +0x9ec
  main.main()
      _testmain.go:143 +0x294
==================
==================
WARNING: DATA RACE
Read at 0x00c00022a540 by goroutine 67:
  runtime.evacuate_fast32()
      /usr/local/opt/go/libexec/src/runtime/map_fast32.go:374 +0x38c
  github.com/Azure/go-shuttle/v2_test.Test_RenewalHandlerStayIndependentPerMessage.func2()
      /Users/karenchen/go/src/go-shuttle/v2/lockrenewer_test.go:96 +0x74
  runtime.call16()
      /usr/local/opt/go/libexec/src/runtime/asm_arm64.s:478 +0x74
  reflect.Value.Call()
      /usr/local/opt/go/libexec/src/reflect/value.go:380 +0x90
  github.com/onsi/gomega/internal.(*AsyncAssertion).buildActualPoller.func3()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/async_assertion.go:325 +0x178
  github.com/onsi/gomega/internal.(*AsyncAssertion).match()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/async_assertion.go:540 +0xadc
  github.com/onsi/gomega/internal.(*Assertion).ToNot()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/assertion.go:68 +0xe4
  github.com/Azure/go-shuttle/v2_test.Test_RenewalHandlerStayIndependentPerMessage.func2()
      /Users/karenchen/go/src/go-shuttle/v2/lockrenewer_test.go:97 +0x1fc
  runtime.call16()
      /usr/local/opt/go/libexec/src/runtime/asm_arm64.s:478 +0x74
  reflect.Value.Call()
      /usr/local/opt/go/libexec/src/reflect/value.go:380 +0x90
  github.com/onsi/gomega/internal.(*AsyncAssertion).buildActualPoller.func3()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/async_assertion.go:325 +0x178
  github.com/onsi/gomega/internal.(*AsyncAssertion).match()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/async_assertion.go:540 +0xadc
  github.com/onsi/gomega/internal.(*Assertion).ToNot()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/assertion.go:68 +0xe4
  github.com/Azure/go-shuttle/v2_test.Test_RenewalHandlerStayIndependentPerMessage.func2()
      /Users/karenchen/go/src/go-shuttle/v2/lockrenewer_test.go:97 +0x1fc
  runtime.call16()
      /usr/local/opt/go/libexec/src/runtime/asm_arm64.s:478 +0x74
  reflect.Value.Call()
      /usr/local/opt/go/libexec/src/reflect/value.go:380 +0x90
  github.com/onsi/gomega/internal.(*AsyncAssertion).buildActualPoller.func3()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/async_assertion.go:325 +0x178
  github.com/onsi/gomega/internal.(*AsyncAssertion).match()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/async_assertion.go:540 +0xadc
  github.com/onsi/gomega/internal.(*Assertion).ToNot()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/assertion.go:68 +0xe4
  github.com/Azure/go-shuttle/v2_test.Test_RenewalHandlerStayIndependentPerMessage.func2()
      /Users/karenchen/go/src/go-shuttle/v2/lockrenewer_test.go:97 +0x1fc
  runtime.call16()
      /usr/local/opt/go/libexec/src/runtime/asm_arm64.s:478 +0x74
  reflect.Value.Call()
      /usr/local/opt/go/libexec/src/reflect/value.go:380 +0x90
  github.com/onsi/gomega/internal.(*AsyncAssertion).buildActualPoller.func3()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/async_assertion.go:325 +0x178
  github.com/onsi/gomega/internal.(*AsyncAssertion).match()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/async_assertion.go:540 +0xadc
  github.com/onsi/gomega/internal.(*Assertion).ToNot()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/assertion.go:68 +0xe4
  github.com/Azure/go-shuttle/v2_test.Test_RenewalHandlerStayIndependentPerMessage.func2()
      /Users/karenchen/go/src/go-shuttle/v2/lockrenewer_test.go:97 +0x1fc
  runtime.call16()
      /usr/local/opt/go/libexec/src/runtime/asm_arm64.s:478 +0x74
  reflect.Value.Call()
      /usr/local/opt/go/libexec/src/reflect/value.go:380 +0x90
  github.com/onsi/gomega/internal.(*AsyncAssertion).buildActualPoller.func3()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/async_assertion.go:325 +0x178
  github.com/onsi/gomega/internal.(*AsyncAssertion).match()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/async_assertion.go:540 +0xadc
  github.com/onsi/gomega/internal.(*Assertion).ToNot()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/assertion.go:68 +0xe4
  github.com/Azure/go-shuttle/v2_test.Test_RenewalHandlerStayIndependentPerMessage.func2()
      /Users/karenchen/go/src/go-shuttle/v2/lockrenewer_test.go:97 +0x1fc
  runtime.call16()
      /usr/local/opt/go/libexec/src/runtime/asm_arm64.s:478 +0x74
  reflect.Value.Call()
      /usr/local/opt/go/libexec/src/reflect/value.go:380 +0x90
  github.com/onsi/gomega/internal.(*AsyncAssertion).buildActualPoller.func3()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/async_assertion.go:325 +0x178
  github.com/onsi/gomega/internal.(*AsyncAssertion).match()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/async_assertion.go:398 +0x1f4
  github.com/onsi/gomega/internal.(*AsyncAssertion).Should()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/async_assertion.go:145 +0xa8
  github.com/Azure/go-shuttle/v2_test.Test_RenewalHandlerStayIndependentPerMessage()
      /Users/karenchen/go/src/go-shuttle/v2/lockrenewer_test.go:101 +0x7fc
  testing.tRunner()
      /usr/local/opt/go/libexec/src/testing/testing.go:1595 +0x1b0
  testing.(*T).Run.func1()
      /usr/local/opt/go/libexec/src/testing/testing.go:1648 +0x40

Previous write at 0x00c00022a540 by goroutine 70:
  runtime.mapaccess2_fast64()
      /usr/local/opt/go/libexec/src/runtime/map_fast64.go:53 +0x1cc
  github.com/Azure/go-shuttle/v2_test.(*fakeSBRenewLockSettler).RenewMessageLock()
      /Users/karenchen/go/src/go-shuttle/v2/lockrenewer_test.go:34 +0xe4
  github.com/Azure/go-shuttle/v2.(*peekLockRenewer).startPeriodicRenewal()
      /Users/karenchen/go/src/go-shuttle/v2/lockrenewer.go:128 +0x2e8
  github.com/Azure/go-shuttle/v2_test.Test_RenewalHandlerStayIndependentPerMessage.NewRenewLockHandler.func4.1()
      /Users/karenchen/go/src/go-shuttle/v2/lockrenewer.go:61 +0x58

Goroutine 67 (running) created at:
  testing.(*T).Run()
      /usr/local/opt/go/libexec/src/testing/testing.go:1648 +0x5e8
  testing.runTests.func1()
      /usr/local/opt/go/libexec/src/testing/testing.go:2054 +0x80
  testing.tRunner()
      /usr/local/opt/go/libexec/src/testing/testing.go:1595 +0x1b0
  testing.runTests()
      /usr/local/opt/go/libexec/src/testing/testing.go:2052 +0x6e4
  testing.(*M).Run()
      /usr/local/opt/go/libexec/src/testing/testing.go:1925 +0x9ec
  main.main()
      _testmain.go:143 +0x294

Goroutine 70 (running) created at:
  github.com/Azure/go-shuttle/v2_test.Test_RenewalHandlerStayIndependentPerMessage.NewRenewLockHandler.func4()
      /Users/karenchen/go/src/go-shuttle/v2/lockrenewer.go:61 +0x370
  github.com/Azure/go-shuttle/v2.HandlerFunc.Handle()
      /Users/karenchen/go/src/go-shuttle/v2/processor.go:49 +0x58
  github.com/Azure/go-shuttle/v2_test.Test_RenewalHandlerStayIndependentPerMessage.func5()
      /Users/karenchen/go/src/go-shuttle/v2/lockrenewer_test.go:90 +0x70
==================
==================
WARNING: DATA RACE
Read at 0x00c0001b20d8 by goroutine 67:
  github.com/Azure/go-shuttle/v2_test.Test_RenewalHandlerStayIndependentPerMessage.func2()
      /Users/karenchen/go/src/go-shuttle/v2/lockrenewer_test.go:97 +0x158
  runtime.call16()
      /usr/local/opt/go/libexec/src/runtime/asm_arm64.s:478 +0x74
  reflect.Value.Call()
      /usr/local/opt/go/libexec/src/reflect/value.go:380 +0x90
  github.com/onsi/gomega/internal.(*AsyncAssertion).buildActualPoller.func3()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/async_assertion.go:325 +0x178
  github.com/onsi/gomega/internal.(*AsyncAssertion).match()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/async_assertion.go:540 +0xadc
  github.com/onsi/gomega/internal.(*Assertion).ToNot()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/assertion.go:68 +0xe4
  github.com/Azure/go-shuttle/v2_test.Test_RenewalHandlerStayIndependentPerMessage.func2()
      /Users/karenchen/go/src/go-shuttle/v2/lockrenewer_test.go:97 +0x1fc
  runtime.call16()
      /usr/local/opt/go/libexec/src/runtime/asm_arm64.s:478 +0x74
  reflect.Value.Call()
      /usr/local/opt/go/libexec/src/reflect/value.go:380 +0x90
  github.com/onsi/gomega/internal.(*AsyncAssertion).buildActualPoller.func3()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/async_assertion.go:325 +0x178
  github.com/onsi/gomega/internal.(*AsyncAssertion).match()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/async_assertion.go:540 +0xadc
  github.com/onsi/gomega/internal.(*Assertion).ToNot()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/assertion.go:68 +0xe4
  github.com/Azure/go-shuttle/v2_test.Test_RenewalHandlerStayIndependentPerMessage.func2()
      /Users/karenchen/go/src/go-shuttle/v2/lockrenewer_test.go:97 +0x1fc
  runtime.call16()
      /usr/local/opt/go/libexec/src/runtime/asm_arm64.s:478 +0x74
  reflect.Value.Call()
      /usr/local/opt/go/libexec/src/reflect/value.go:380 +0x90
  github.com/onsi/gomega/internal.(*AsyncAssertion).buildActualPoller.func3()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/async_assertion.go:325 +0x178
  github.com/onsi/gomega/internal.(*AsyncAssertion).match()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/async_assertion.go:540 +0xadc
  github.com/onsi/gomega/internal.(*Assertion).ToNot()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/assertion.go:68 +0xe4
  github.com/Azure/go-shuttle/v2_test.Test_RenewalHandlerStayIndependentPerMessage.func2()
      /Users/karenchen/go/src/go-shuttle/v2/lockrenewer_test.go:97 +0x1fc
  runtime.call16()
      /usr/local/opt/go/libexec/src/runtime/asm_arm64.s:478 +0x74
  reflect.Value.Call()
      /usr/local/opt/go/libexec/src/reflect/value.go:380 +0x90
  github.com/onsi/gomega/internal.(*AsyncAssertion).buildActualPoller.func3()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/async_assertion.go:325 +0x178
  github.com/onsi/gomega/internal.(*AsyncAssertion).match()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/async_assertion.go:540 +0xadc
  github.com/onsi/gomega/internal.(*Assertion).ToNot()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/assertion.go:68 +0xe4
  github.com/Azure/go-shuttle/v2_test.Test_RenewalHandlerStayIndependentPerMessage.func2()
      /Users/karenchen/go/src/go-shuttle/v2/lockrenewer_test.go:97 +0x1fc
  runtime.call16()
      /usr/local/opt/go/libexec/src/runtime/asm_arm64.s:478 +0x74
  reflect.Value.Call()
      /usr/local/opt/go/libexec/src/reflect/value.go:380 +0x90
  github.com/onsi/gomega/internal.(*AsyncAssertion).buildActualPoller.func3()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/async_assertion.go:325 +0x178
  github.com/onsi/gomega/internal.(*AsyncAssertion).match()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/async_assertion.go:540 +0xadc
  github.com/onsi/gomega/internal.(*Assertion).ToNot()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/assertion.go:68 +0xe4
  github.com/Azure/go-shuttle/v2_test.Test_RenewalHandlerStayIndependentPerMessage.func2()
      /Users/karenchen/go/src/go-shuttle/v2/lockrenewer_test.go:97 +0x1fc
  runtime.call16()
      /usr/local/opt/go/libexec/src/runtime/asm_arm64.s:478 +0x74
  reflect.Value.Call()
      /usr/local/opt/go/libexec/src/reflect/value.go:380 +0x90
  github.com/onsi/gomega/internal.(*AsyncAssertion).buildActualPoller.func3()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/async_assertion.go:325 +0x178
  github.com/onsi/gomega/internal.(*AsyncAssertion).match()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/async_assertion.go:398 +0x1f4
  github.com/onsi/gomega/internal.(*AsyncAssertion).Should()
      /Users/karenchen/go/pkg/mod/github.com/onsi/gomega@v1.32.0/internal/async_assertion.go:145 +0xa8
  github.com/Azure/go-shuttle/v2_test.Test_RenewalHandlerStayIndependentPerMessage()
      /Users/karenchen/go/src/go-shuttle/v2/lockrenewer_test.go:101 +0x7fc
  testing.tRunner()
      /usr/local/opt/go/libexec/src/testing/testing.go:1595 +0x1b0
  testing.(*T).Run.func1()
      /usr/local/opt/go/libexec/src/testing/testing.go:1648 +0x40

Previous write at 0x00c0001b20d8 by goroutine 70:
  github.com/Azure/go-shuttle/v2_test.(*fakeSBRenewLockSettler).RenewMessageLock()
      /Users/karenchen/go/src/go-shuttle/v2/lockrenewer_test.go:34 +0xf0
  github.com/Azure/go-shuttle/v2.(*peekLockRenewer).startPeriodicRenewal()
      /Users/karenchen/go/src/go-shuttle/v2/lockrenewer.go:128 +0x2e8
  github.com/Azure/go-shuttle/v2_test.Test_RenewalHandlerStayIndependentPerMessage.NewRenewLockHandler.func4.1()
      /Users/karenchen/go/src/go-shuttle/v2/lockrenewer.go:61 +0x58

Goroutine 67 (running) created at:
  testing.(*T).Run()
      /usr/local/opt/go/libexec/src/testing/testing.go:1648 +0x5e8
  testing.runTests.func1()
      /usr/local/opt/go/libexec/src/testing/testing.go:2054 +0x80
  testing.tRunner()
      /usr/local/opt/go/libexec/src/testing/testing.go:1595 +0x1b0
  testing.runTests()
      /usr/local/opt/go/libexec/src/testing/testing.go:2052 +0x6e4
  testing.(*M).Run()
      /usr/local/opt/go/libexec/src/testing/testing.go:1925 +0x9ec
  main.main()
      _testmain.go:143 +0x294

Goroutine 70 (running) created at:
  github.com/Azure/go-shuttle/v2_test.Test_RenewalHandlerStayIndependentPerMessage.NewRenewLockHandler.func4()
      /Users/karenchen/go/src/go-shuttle/v2/lockrenewer.go:61 +0x370
  github.com/Azure/go-shuttle/v2.HandlerFunc.Handle()
      /Users/karenchen/go/src/go-shuttle/v2/processor.go:49 +0x58
  github.com/Azure/go-shuttle/v2_test.Test_RenewalHandlerStayIndependentPerMessage.func5()
      /Users/karenchen/go/src/go-shuttle/v2/lockrenewer_test.go:90 +0x70
==================
--- FAIL: Test_RenewalHandlerStayIndependentPerMessage (0.12s)
    testing.go:1465: race detected during execution of test
FAIL
FAIL    github.com/Azure/go-shuttle/v2  4.673s
ok      github.com/Azure/go-shuttle/v2/metrics  (cached)
ok      github.com/Azure/go-shuttle/v2/metrics/processor        (cached)
ok      github.com/Azure/go-shuttle/v2/metrics/sender   (cached)
ok      github.com/Azure/go-shuttle/v2/otel     (cached)
FAIL

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

No branches or pull requests

1 participant