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

Race conditions when testing #15

Open
altafan opened this issue Aug 24, 2022 · 1 comment
Open

Race conditions when testing #15

altafan opened this issue Aug 24, 2022 · 1 comment

Comments

@altafan
Copy link
Collaborator

altafan commented Aug 24, 2022

Sometimes seems like tests generate race conditions. Further info will follow.

@sekulicd
Copy link
Contributor

WARNING: DATA RACE
Read at 0x00c020beed43 by goroutine 654:
  testing.(*common).logDepth()
      /opt/hostedtoolcache/go/1.19.4/x64/src/testing/testing.go:883 +0xc4
  testing.(*common).log()
      /opt/hostedtoolcache/go/1.19.4/x64/src/testing/testing.go:876 +0xa4
  testing.(*common).Logf()
      /opt/hostedtoolcache/go/1.19.4/x64/src/testing/testing.go:927 +0x6a
  github.com/equitas-foundation/bamp-ocean/internal/infrastructure/storage/db/test_test.TestWalletRepository.func1.1()
      /home/runner/work/ocean/ocean/internal/infrastructure/storage/db/test/wallet_repository_test.go:69 +0x1fd
  github.com/equitas-foundation/bamp-ocean/internal/infrastructure/storage/db/inmemory.(*repoManager).listenToWalletEvents.func1()
      /home/runner/work/ocean/ocean/internal/infrastructure/storage/db/inmemory/repo_manager.go:79 +0xb2

Previous write at 0x00c020beed43 by goroutine 541:
  testing.tRunner.func1()
      /opt/hostedtoolcache/go/1.19.4/x64/src/testing/testing.go:1433 +0x7e4
  runtime.deferreturn()
      /opt/hostedtoolcache/go/1.19.4/x64/src/runtime/panic.go:476 +0x32
  testing.(*T).Run.func1()
      /opt/hostedtoolcache/go/1.19.4/x64/src/testing/testing.go:1493 +0x47

Goroutine 654 (running) created at:
  github.com/equitas-foundation/bamp-ocean/internal/infrastructure/storage/db/inmemory.(*repoManager).listenToWalletEvents()
      /home/runner/work/ocean/ocean/internal/infrastructure/storage/db/inmemory/repo_manager.go:79 +0x190
  github.com/equitas-foundation/bamp-ocean/internal/infrastructure/storage/db/inmemory.NewRepoManager.func1()
      /home/runner/work/ocean/ocean/internal/infrastructure/storage/db/inmemory/repo_manager.go:35 +0x39

Goroutine 541 (finished) created at:
  testing.(*T).Run()
      /opt/hostedtoolcache/go/1.19.4/x64/src/testing/testing.go:1493 +0x75d
  testing.runTests.func1()
      /opt/hostedtoolcache/go/1.19.4/x64/src/testing/testing.go:1846 +0x99
  testing.tRunner()
      /opt/hostedtoolcache/go/1.19.4/x64/src/testing/testing.go:1446 +0x216
  testing.runTests()
      /opt/hostedtoolcache/go/1.19.4/x64/src/testing/testing.go:1844 +0x7ec
  testing.(*M).Run()
      /opt/hostedtoolcache/go/1.19.4/x64/src/testing/testing.go:1726 +0xa84
  github.com/equitas-foundation/bamp-ocean/internal/infrastructure/storage/db/test_test.TestMain()
      /home/runner/work/ocean/ocean/internal/infrastructure/storage/db/test/wallet_repository_test.go:61 +0x9d9
  main.main()
      _testmain.go:53 +0x324

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 a pull request may close this issue.

2 participants