We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
There are several data races when running the tests with the race detector enabled.
Some may simply be due to mocking, however I think a couple may be symptoms of actual bugs
Steps for Reproduction
go test -v -race ./...
Expected behavior:
Tests pass with no data races detected
Actual behavior:
go test -v -race ./... === RUN TestNew --- PASS: TestNew (0.00s) === RUN TestCacheSet --- PASS: TestCacheSet (0.00s) === RUN TestCacheSetWhenErrorOccurs --- PASS: TestCacheSetWhenErrorOccurs (0.00s) === RUN TestCacheGet --- PASS: TestCacheGet (0.00s) === RUN TestCacheGetWhenNotFound --- PASS: TestCacheGetWhenNotFound (0.00s) === RUN TestCacheGetCodec --- PASS: TestCacheGetCodec (0.00s) === RUN TestCacheGetType --- PASS: TestCacheGetType (0.00s) === RUN TestCacheDelete --- PASS: TestCacheDelete (0.00s) === RUN TestCacheInvalidate --- PASS: TestCacheInvalidate (0.00s) === RUN TestCacheInvalidateWhenError --- PASS: TestCacheInvalidateWhenError (0.00s) === RUN TestCacheClear --- PASS: TestCacheClear (0.00s) === RUN TestCacheClearWhenError --- PASS: TestCacheClearWhenError (0.00s) === RUN TestCacheDeleteWhenError --- PASS: TestCacheDeleteWhenError (0.00s) === RUN TestNewChain --- PASS: TestNewChain (0.00s) === RUN TestChainGetCaches --- PASS: TestChainGetCaches (0.00s) === RUN TestChainGetWhenAvailableInFirstCache --- PASS: TestChainGetWhenAvailableInFirstCache (0.00s) === RUN TestChainGetWhenAvailableInSecondCache 2019/12/02 15:17:35 Unable to retrieve item from cache with store 'store1': Unable to find in cache 1 --- PASS: TestChainGetWhenAvailableInSecondCache (0.00s) === RUN TestChainGetWhenNotAvailableInAnyCache 2019/12/02 15:17:35 Unable to retrieve item from cache with store 'store1': Unable to find in cache 1 2019/12/02 15:17:35 Unable to retrieve item from cache with store 'store2': Unable to find in cache 2 --- PASS: TestChainGetWhenNotAvailableInAnyCache (0.00s) === RUN TestChainSet --- PASS: TestChainSet (0.00s) === RUN TestChainSetWhenErrorOnSetting --- PASS: TestChainSetWhenErrorOnSetting (0.00s) === RUN TestChainDelete --- PASS: TestChainDelete (0.00s) === RUN TestChainDeleteWhenError --- PASS: TestChainDeleteWhenError (0.00s) === RUN TestChainInvalidate --- PASS: TestChainInvalidate (0.00s) === RUN TestChainInvalidateWhenError --- PASS: TestChainInvalidateWhenError (0.00s) === RUN TestChainClear --- PASS: TestChainClear (0.00s) === RUN TestChainClearWhenError --- PASS: TestChainClearWhenError (0.00s) === RUN TestChainGetType --- PASS: TestChainGetType (0.00s) === RUN TestCacheChecksum --- PASS: TestCacheChecksum (0.00s) === RUN TestNewLoadable --- PASS: TestNewLoadable (0.00s) === RUN TestLoadableGetWhenAlreadyInCache --- PASS: TestLoadableGetWhenAlreadyInCache (0.00s) === RUN TestLoadableGetWhenNotAvailableInLoadFunc 2019/12/02 15:17:35 An error has occurred while trying to load item from load function: An error has occurred while loading data from custom source --- PASS: TestLoadableGetWhenNotAvailableInLoadFunc (0.00s) === RUN TestLoadableGetWhenAvailableInLoadFunc --- PASS: TestLoadableGetWhenAvailableInLoadFunc (0.00s) === RUN TestLoadableDelete --- PASS: TestLoadableDelete (0.00s) === RUN TestLoadableDeleteWhenError --- PASS: TestLoadableDeleteWhenError (0.00s) === RUN TestLoadableInvalidate --- PASS: TestLoadableInvalidate (0.00s) === RUN TestLoadableInvalidateWhenError --- PASS: TestLoadableInvalidateWhenError (0.00s) === RUN TestLoadableClear --- PASS: TestLoadableClear (0.00s) === RUN TestLoadableClearWhenError --- PASS: TestLoadableClearWhenError (0.00s) === RUN TestLoadableGetType --- PASS: TestLoadableGetType (0.00s) === RUN TestNewMetric --- PASS: TestNewMetric (0.00s) === RUN TestMetricGet --- PASS: TestMetricGet (0.00s) === RUN TestMetricGetWhenChainCache --- PASS: TestMetricGetWhenChainCache (0.00s) === RUN TestMetricSet ================== WARNING: DATA RACE Read at 0x00c00014a9c8 by goroutine 58: reflect.typedmemmove() /usr/local/Cellar/go/1.13.4/libexec/src/runtime/mbarrier.go:177 +0x0 reflect.packEface() /usr/local/Cellar/go/1.13.4/libexec/src/reflect/value.go:119 +0x103 reflect.valueInterface() /usr/local/Cellar/go/1.13.4/libexec/src/reflect/value.go:1033 +0x16f fmt.(*pp).printValue() /usr/local/Cellar/go/1.13.4/libexec/src/reflect/value.go:1003 +0x38f7 fmt.(*pp).printValue() /usr/local/Cellar/go/1.13.4/libexec/src/fmt/print.go:880 +0x25da fmt.(*pp).printArg() /usr/local/Cellar/go/1.13.4/libexec/src/fmt/print.go:716 +0x2ee fmt.(*pp).doPrintf() /usr/local/Cellar/go/1.13.4/libexec/src/fmt/print.go:1126 +0x912 fmt.Sprintf() /usr/local/Cellar/go/1.13.4/libexec/src/fmt/print.go:219 +0x73 github.com/stretchr/testify/mock.Arguments.Diff() /Users/markphelps/go/pkg/mod/github.com/stretchr/testify@v1.4.0/mock/mock.go:687 +0xf1a github.com/stretchr/testify/mock.(*Mock).findExpectedCall() /Users/markphelps/go/pkg/mod/github.com/stretchr/testify@v1.4.0/mock/mock.go:269 +0x16a github.com/stretchr/testify/mock.(*Mock).MethodCalled() /Users/markphelps/go/pkg/mod/github.com/stretchr/testify@v1.4.0/mock/mock.go:348 +0xb3 github.com/stretchr/testify/mock.(*Mock).Called() /Users/markphelps/go/pkg/mod/github.com/stretchr/testify@v1.4.0/mock/mock.go:338 +0x1e4 github.com/eko/gocache/test/mocks/metrics.(*MetricsInterface).RecordFromCodec() /Users/markphelps/workspace/gocache/test/mocks/metrics/metrics_interface.go:21 +0xaa Previous write at 0x00c00014a9c8 by goroutine 57: github.com/stretchr/testify/mock.(*Mock).MethodCalled() /Users/markphelps/go/pkg/mod/github.com/stretchr/testify@v1.4.0/mock/mock.go:385 +0x7b6 github.com/stretchr/testify/mock.(*Mock).Called() /Users/markphelps/go/pkg/mod/github.com/stretchr/testify@v1.4.0/mock/mock.go:338 +0x1e4 github.com/eko/gocache/test/mocks/codec.(*CodecInterface).GetStore() /Users/markphelps/workspace/gocache/test/mocks/codec/codec_interface.go:83 +0x63 github.com/eko/gocache/cache.(*ChainCache).setUntil() /Users/markphelps/workspace/gocache/cache/chain.go:90 +0x13b Goroutine 58 (running) created at: github.com/eko/gocache/cache.(*MetricCache).updateMetrics() /Users/markphelps/workspace/gocache/cache/metric.go:65 +0x1bd github.com/eko/gocache/cache.(*MetricCache).updateMetrics() /Users/markphelps/workspace/gocache/cache/metric.go:61 +0xff github.com/eko/gocache/cache.(*MetricCache).Get() /Users/markphelps/workspace/gocache/cache/metric.go:31 +0xcb github.com/eko/gocache/cache.TestMetricGetWhenChainCache() /Users/markphelps/workspace/gocache/cache/metric_test.go:83 +0x714 testing.tRunner() /usr/local/Cellar/go/1.13.4/libexec/src/testing/testing.go:909 +0x199 Goroutine 57 (finished) created at: github.com/eko/gocache/cache.(*ChainCache).Get() /Users/markphelps/workspace/gocache/cache/chain.go:37 +0x383 github.com/eko/gocache/cache.(*MetricCache).Get() /Users/markphelps/workspace/gocache/cache/metric.go:29 +0x75 github.com/eko/gocache/cache.TestMetricGetWhenChainCache() /Users/markphelps/workspace/gocache/cache/metric_test.go:83 +0x714 testing.tRunner() /usr/local/Cellar/go/1.13.4/libexec/src/testing/testing.go:909 +0x199 ================== ================== WARNING: DATA RACE Read at 0x00c00014a9f8 by goroutine 58: reflect.typedmemmove() /usr/local/Cellar/go/1.13.4/libexec/src/runtime/mbarrier.go:177 +0x0 --- FAIL: TestMetricSet (0.00s) reflect.packEface() /usr/local/Cellar/go/1.13.4/libexec/src/reflect/value.go:119 +0x103 testing.go:853: race detected during execution of test reflect.valueInterface() /usr/local/Cellar/go/1.13.4/libexec/src/reflect/value.go:1033 +0x16f fmt.(*pp).printValue() /usr/local/Cellar/go/1.13.4/libexec/src/reflect/value.go:1003 +0x38f7 fmt.(*pp).printValue() /usr/local/Cellar/go/1.13.4/libexec/src/fmt/print.go:880 +0x25da fmt.(*pp).printArg() /usr/local/Cellar/go/1.13.4/libexec/src/fmt/print.go:716 +0x2ee fmt.(*pp).doPrintf() /usr/local/Cellar/go/1.13.4/libexec/src/fmt/print.go:1126 +0x912 fmt.Sprintf() /usr/local/Cellar/go/1.13.4/libexec/src/fmt/print.go:219 +0x73 github.com/stretchr/testify/mock.Arguments.Diff() /Users/markphelps/go/pkg/mod/github.com/stretchr/testify@v1.4.0/mock/mock.go:687 +0xf1a github.com/stretchr/testify/mock.(*Mock).findExpectedCall() /Users/markphelps/go/pkg/mod/github.com/stretchr/testify@v1.4.0/mock/mock.go:269 +0x16a github.com/stretchr/testify/mock.(*Mock).MethodCalled() /Users/markphelps/go/pkg/mod/github.com/stretchr/testify@v1.4.0/mock/mock.go:348 +0xb3 github.com/stretchr/testify/mock.(*Mock).Called() /Users/markphelps/go/pkg/mod/github.com/stretchr/testify@v1.4.0/mock/mock.go:338 +0x1e4 github.com/eko/gocache/test/mocks/metrics.(*MetricsInterface).RecordFromCodec() /Users/markphelps/workspace/gocache/test/mocks/metrics/metrics_interface.go:21 +0xaa Previous write at 0x00c00014a9f8 by goroutine 57: sync/atomic.AddInt32() /usr/local/Cellar/go/1.13.4/libexec/src/runtime/race_amd64.s:269 +0xb sync.(*Mutex).Unlock() /usr/local/Cellar/go/1.13.4/libexec/src/sync/mutex.go:186 +0x51 github.com/stretchr/testify/mock.(*Mock).MethodCalled() /Users/markphelps/go/pkg/mod/github.com/stretchr/testify@v1.4.0/mock/mock.go:405 +0x921 github.com/stretchr/testify/mock.(*Mock).Called() /Users/markphelps/go/pkg/mod/github.com/stretchr/testify@v1.4.0/mock/mock.go:338 +0x1e4 github.com/eko/gocache/test/mocks/codec.(*CodecInterface).GetStore() /Users/markphelps/workspace/gocache/test/mocks/codec/codec_interface.go:83 +0x63 github.com/eko/gocache/cache.(*ChainCache).setUntil() /Users/markphelps/workspace/gocache/cache/chain.go:90 +0x13b Goroutine 58 (running) created at: github.com/eko/gocache/cache.(*MetricCache).updateMetrics() /Users/markphelps/workspace/gocache/cache/metric.go:65 +0x1bd github.com/eko/gocache/cache.(*MetricCache).updateMetrics() /Users/markphelps/workspace/gocache/cache/metric.go:61 +0xff github.com/eko/gocache/cache.(*MetricCache).Get() /Users/markphelps/workspace/gocache/cache/metric.go:31 +0xcb github.com/eko/gocache/cache.TestMetricGetWhenChainCache() /Users/markphelps/workspace/gocache/cache/metric_test.go:83 +0x714 testing.tRunner() /usr/local/Cellar/go/1.13.4/libexec/src/testing/testing.go:909 +0x199 === RUN TestMetricDelete Goroutine 57 (finished) created at: github.com/eko/gocache/cache.(*ChainCache).Get() /Users/markphelps/workspace/gocache/cache/chain.go:37 +0x383 github.com/eko/gocache/cache.(*MetricCache).Get() /Users/markphelps/workspace/gocache/cache/metric.go:29 +0x75 github.com/eko/gocache/cache.TestMetricGetWhenChainCache() /Users/markphelps/workspace/gocache/cache/metric_test.go:83 +0x714 testing.tRunner() /usr/local/Cellar/go/1.13.4/libexec/src/testing/testing.go:909 +0x199 ================== ================== WARNING: DATA RACE Read at 0x00c0001f6870 by goroutine 58: reflect.typedmemmove() /usr/local/Cellar/go/1.13.4/libexec/src/runtime/mbarrier.go:177 +0x0 reflect.packEface() /usr/local/Cellar/go/1.13.4/libexec/src/reflect/value.go:119 +0x103 reflect.valueInterface() /usr/local/Cellar/go/1.13.4/libexec/src/reflect/value.go:1033 +0x16f fmt.(*pp).printValue() /usr/local/Cellar/go/1.13.4/libexec/src/reflect/value.go:1003 +0x38f7 fmt.(*pp).printValue() /usr/local/Cellar/go/1.13.4/libexec/src/fmt/print.go:869 +0xec7 fmt.(*pp).printValue() /usr/local/Cellar/go/1.13.4/libexec/src/fmt/print.go:810 +0x283f fmt.(*pp).printValue() /usr/local/Cellar/go/1.13.4/libexec/src/fmt/print.go:810 +0x283f fmt.(*pp).printValue() /usr/local/Cellar/go/1.13.4/libexec/src/fmt/print.go:880 +0x25da fmt.(*pp).printArg() /usr/local/Cellar/go/1.13.4/libexec/src/fmt/print.go:716 +0x2ee fmt.(*pp).doPrintf() /usr/local/Cellar/go/1.13.4/libexec/src/fmt/print.go:1126 +0x912 fmt.Sprintf() /usr/local/Cellar/go/1.13.4/libexec/src/fmt/print.go:219 +0x73 github.com/stretchr/testify/mock.Arguments.Diff() /Users/markphelps/go/pkg/mod/github.com/stretchr/testify@v1.4.0/mock/mock.go:687 +0xf1a github.com/stretchr/testify/mock.(*Mock).findExpectedCall() /Users/markphelps/go/pkg/mod/github.com/stretchr/testify@v1.4.0/mock/mock.go:269 +0x16a github.com/stretchr/testify/mock.(*Mock).MethodCalled() /Users/markphelps/go/pkg/mod/github.com/stretchr/testify@v1.4.0/mock/mock.go:348 +0xb3 github.com/stretchr/testify/mock.(*Mock).Called() /Users/markphelps/go/pkg/mod/github.com/stretchr/testify@v1.4.0/mock/mock.go:338 +0x1e4 github.com/eko/gocache/test/mocks/metrics.(*MetricsInterface).RecordFromCodec() /Users/markphelps/workspace/gocache/test/mocks/metrics/metrics_interface.go:21 +0xaa Previous write at 0x00c0001f6870 by goroutine 57: github.com/stretchr/testify/mock.(*Mock).MethodCalled() /Users/markphelps/go/pkg/mod/github.com/stretchr/testify@v1.4.0/mock/mock.go:385 +0x775 github.com/stretchr/testify/mock.(*Mock).Called() /Users/markphelps/go/pkg/mod/github.com/stretchr/testify@v1.4.0/mock/mock.go:338 +0x1e4 github.com/eko/gocache/test/mocks/codec.(*CodecInterface).GetStore() /Users/markphelps/workspace/gocache/test/mocks/codec/codec_interface.go:83 +0x63 github.com/eko/gocache/cache.(*ChainCache).setUntil() /Users/markphelps/workspace/gocache/cache/chain.go:90 +0x13b Goroutine 58 (running) created at: github.com/eko/gocache/cache.(*MetricCache).updateMetrics() /Users/markphelps/workspace/gocache/cache/metric.go:65 +0x1bd github.com/eko/gocache/cache.(*MetricCache).updateMetrics() /Users/markphelps/workspace/gocache/cache/metric.go:61 +0xff github.com/eko/gocache/cache.(*MetricCache).Get() /Users/markphelps/workspace/gocache/cache/metric.go:31 +0xcb github.com/eko/gocache/cache.TestMetricGetWhenChainCache() /Users/markphelps/workspace/gocache/cache/metric_test.go:83 +0x714 testing.tRunner() /usr/local/Cellar/go/1.13.4/libexec/src/testing/testing.go:909 +0x199 Goroutine 57 (finished) created at: github.com/eko/gocache/cache.(*ChainCache).Get() /Users/markphelps/workspace/gocache/cache/chain.go:37 +0x383 github.com/eko/gocache/cache.(*MetricCache).Get() /Users/markphelps/workspace/gocache/cache/metric.go:29 +0x75 github.com/eko/gocache/cache.TestMetricGetWhenChainCache() /Users/markphelps/workspace/gocache/cache/metric_test.go:83 +0x714 testing.tRunner() /usr/local/Cellar/go/1.13.4/libexec/src/testing/testing.go:909 +0x199 ================== --- FAIL: TestMetricDelete (0.00s) testing.go:853: race detected during execution of test === RUN TestMetricDeleteWhenError --- PASS: TestMetricDeleteWhenError (0.00s) === RUN TestMetricInvalidate ================== WARNING: DATA RACE Read at 0x00c0002dcba0 by goroutine 58: reflect.Value.String() /usr/local/Cellar/go/1.13.4/libexec/src/reflect/value.go:1845 +0x5d fmt.(*pp).printValue() /usr/local/Cellar/go/1.13.4/libexec/src/fmt/print.go:761 +0x3156 fmt.(*pp).printValue() /usr/local/Cellar/go/1.13.4/libexec/src/fmt/print.go:869 +0xec7 fmt.(*pp).printValue() /usr/local/Cellar/go/1.13.4/libexec/src/fmt/print.go:810 +0x283f fmt.(*pp).printValue() /usr/local/Cellar/go/1.13.4/libexec/src/fmt/print.go:869 +0xec7 fmt.(*pp).printValue() /usr/local/Cellar/go/1.13.4/libexec/src/fmt/print.go:810 +0x283f fmt.(*pp).printValue() /usr/local/Cellar/go/1.13.4/libexec/src/fmt/print.go:810 +0x283f fmt.(*pp).printValue() /usr/local/Cellar/go/1.13.4/libexec/src/fmt/print.go:880 +0x25da fmt.(*pp).printArg() /usr/local/Cellar/go/1.13.4/libexec/src/fmt/print.go:716 +0x2ee fmt.(*pp).doPrintf() /usr/local/Cellar/go/1.13.4/libexec/src/fmt/print.go:1126 +0x912 fmt.Sprintf() /usr/local/Cellar/go/1.13.4/libexec/src/fmt/print.go:219 +0x73 github.com/stretchr/testify/mock.Arguments.Diff() /Users/markphelps/go/pkg/mod/github.com/stretchr/testify@v1.4.0/mock/mock.go:687 +0xf1a github.com/stretchr/testify/mock.(*Mock).findExpectedCall() /Users/markphelps/go/pkg/mod/github.com/stretchr/testify@v1.4.0/mock/mock.go:269 +0x16a github.com/stretchr/testify/mock.(*Mock).MethodCalled() /Users/markphelps/go/pkg/mod/github.com/stretchr/testify@v1.4.0/mock/mock.go:348 +0xb3 github.com/stretchr/testify/mock.(*Mock).Called() /Users/markphelps/go/pkg/mod/github.com/stretchr/testify@v1.4.0/mock/mock.go:338 +0x1e4 github.com/eko/gocache/test/mocks/metrics.(*MetricsInterface).RecordFromCodec() /Users/markphelps/workspace/gocache/test/mocks/metrics/metrics_interface.go:21 +0xaa Previous write at 0x00c0002dcba0 by goroutine 57: github.com/stretchr/testify/assert.CallerInfo() /Users/markphelps/go/pkg/mod/github.com/stretchr/testify@v1.4.0/assert/assertions.go:146 +0x3c3 github.com/stretchr/testify/mock.(*Mock).MethodCalled() /Users/markphelps/go/pkg/mod/github.com/stretchr/testify@v1.4.0/mock/mock.go:385 +0x57e github.com/stretchr/testify/mock.(*Mock).Called() /Users/markphelps/go/pkg/mod/github.com/stretchr/testify@v1.4.0/mock/mock.go:338 +0x1e4 github.com/eko/gocache/test/mocks/codec.(*CodecInterface).GetStore() /Users/markphelps/workspace/gocache/test/mocks/codec/codec_interface.go:83 +0x63 github.com/eko/gocache/cache.(*ChainCache).setUntil() /Users/markphelps/workspace/gocache/cache/chain.go:90 +0x13b Goroutine 58 (running) created at: github.com/eko/gocache/cache.(*MetricCache).updateMetrics() /Users/markphelps/workspace/gocache/cache/metric.go:65 +0x1bd github.com/eko/gocache/cache.(*MetricCache).updateMetrics() /Users/markphelps/workspace/gocache/cache/metric.go:61 +0xff github.com/eko/gocache/cache.(*MetricCache).Get() /Users/markphelps/workspace/gocache/cache/metric.go:31 +0xcb github.com/eko/gocache/cache.TestMetricGetWhenChainCache() /Users/markphelps/workspace/gocache/cache/metric_test.go:83 +0x714 testing.tRunner() /usr/local/Cellar/go/1.13.4/libexec/src/testing/testing.go:909 +0x199 Goroutine 57 (finished) created at: github.com/eko/gocache/cache.(*ChainCache).Get() /Users/markphelps/workspace/gocache/cache/chain.go:37 +0x383 github.com/eko/gocache/cache.(*MetricCache).Get() /Users/markphelps/workspace/gocache/cache/metric.go:29 +0x75 github.com/eko/gocache/cache.TestMetricGetWhenChainCache() /Users/markphelps/workspace/gocache/cache/metric_test.go:83 +0x714 testing.tRunner() /usr/local/Cellar/go/1.13.4/libexec/src/testing/testing.go:909 +0x199 ================== --- FAIL: TestMetricInvalidate (0.00s) testing.go:853: race detected during execution of test === RUN TestMetricInvalidateWhenError --- PASS: TestMetricInvalidateWhenError (0.00s) === RUN TestMetricClear --- PASS: TestMetricClear (0.00s) === RUN TestMetricClearWhenError --- PASS: TestMetricClearWhenError (0.00s) === RUN TestMetricGetType --- PASS: TestMetricGetType (0.00s) FAIL FAIL github.com/eko/gocache/cache 0.095s === RUN TestNew --- PASS: TestNew (0.00s) === RUN TestGetWhenHit --- PASS: TestGetWhenHit (0.00s) === RUN TestGetWhenMiss --- PASS: TestGetWhenMiss (0.00s) === RUN TestSetWhenSuccess --- PASS: TestSetWhenSuccess (0.00s) === RUN TestSetWhenError --- PASS: TestSetWhenError (0.00s) === RUN TestDeleteWhenSuccess --- PASS: TestDeleteWhenSuccess (0.00s) === RUN TestInvalidateWhenSuccess --- PASS: TestInvalidateWhenSuccess (0.00s) === RUN TestInvalidateWhenError --- PASS: TestInvalidateWhenError (0.00s) === RUN TestClearWhenSuccess --- PASS: TestClearWhenSuccess (0.00s) === RUN TestClearWhenError --- PASS: TestClearWhenError (0.00s) === RUN TestGetStore --- PASS: TestGetStore (0.00s) === RUN TestGetStats --- PASS: TestGetStats (0.00s) PASS ok github.com/eko/gocache/codec (cached) === RUN TestNew --- PASS: TestNew (0.00s) === RUN TestGetWhenStoreReturnsSliceOfBytes --- PASS: TestGetWhenStoreReturnsSliceOfBytes (0.00s) === RUN TestGetWhenStoreReturnsString --- PASS: TestGetWhenStoreReturnsString (0.00s) === RUN TestGetWhenUnmarshalingError --- PASS: TestGetWhenUnmarshalingError (0.00s) === RUN TestGetWhenNotFoundInStore --- PASS: TestGetWhenNotFoundInStore (0.00s) === RUN TestSetWhenStruct --- PASS: TestSetWhenStruct (0.00s) === RUN TestSetWhenString --- PASS: TestSetWhenString (0.00s) === RUN TestSetWhenError --- PASS: TestSetWhenError (0.00s) === RUN TestDelete --- PASS: TestDelete (0.00s) === RUN TestDeleteWhenError --- PASS: TestDeleteWhenError (0.00s) === RUN TestInvalidate --- PASS: TestInvalidate (0.00s) === RUN TestInvalidatingWhenError --- PASS: TestInvalidatingWhenError (0.00s) === RUN TestClear --- PASS: TestClear (0.00s) === RUN TestClearWhenError --- PASS: TestClearWhenError (0.00s) PASS ok github.com/eko/gocache/marshaler (cached) === RUN TestNewPrometheus --- PASS: TestNewPrometheus (0.00s) === RUN TestRecord --- PASS: TestRecord (0.00s) === RUN TestRecordFromCodec --- PASS: TestRecordFromCodec (0.00s) PASS ok github.com/eko/gocache/metrics (cached) === RUN TestNewBigcache --- PASS: TestNewBigcache (0.00s) === RUN TestBigcacheGet --- PASS: TestBigcacheGet (0.00s) === RUN TestBigcacheGetWhenError --- PASS: TestBigcacheGetWhenError (0.00s) === RUN TestBigcacheSet --- PASS: TestBigcacheSet (0.00s) === RUN TestBigcacheSetWhenError --- PASS: TestBigcacheSetWhenError (0.00s) === RUN TestBigcacheSetWithTags --- PASS: TestBigcacheSetWithTags (0.00s) === RUN TestBigcacheSetWithTagsWhenAlreadyInserted --- PASS: TestBigcacheSetWithTagsWhenAlreadyInserted (0.00s) === RUN TestBigcacheDelete --- PASS: TestBigcacheDelete (0.00s) === RUN TestBigcacheDeleteWhenError --- PASS: TestBigcacheDeleteWhenError (0.00s) === RUN TestBigcacheInvalidate --- PASS: TestBigcacheInvalidate (0.00s) === RUN TestBigcacheInvalidateWhenError --- PASS: TestBigcacheInvalidateWhenError (0.00s) === RUN TestBigcacheClear --- PASS: TestBigcacheClear (0.00s) === RUN TestBigcacheClearWhenError --- PASS: TestBigcacheClearWhenError (0.00s) === RUN TestBigcacheGetType --- PASS: TestBigcacheGetType (0.00s) === RUN TestInvalidateOptionsTagsValue --- PASS: TestInvalidateOptionsTagsValue (0.00s) === RUN TestNewMemcache --- PASS: TestNewMemcache (0.00s) === RUN TestMemcacheGet --- PASS: TestMemcacheGet (0.00s) === RUN TestMemcacheGetWhenError --- PASS: TestMemcacheGetWhenError (0.00s) === RUN TestMemcacheSet --- PASS: TestMemcacheSet (0.00s) === RUN TestMemcacheSetWhenNoOptionsGiven --- PASS: TestMemcacheSetWhenNoOptionsGiven (0.00s) === RUN TestMemcacheSetWhenError --- PASS: TestMemcacheSetWhenError (0.00s) === RUN TestMemcacheSetWithTags --- PASS: TestMemcacheSetWithTags (0.00s) === RUN TestMemcacheSetWithTagsWhenAlreadyInserted --- PASS: TestMemcacheSetWithTagsWhenAlreadyInserted (0.00s) === RUN TestMemcacheDelete --- PASS: TestMemcacheDelete (0.00s) === RUN TestMemcacheDeleteWhenError --- PASS: TestMemcacheDeleteWhenError (0.00s) === RUN TestMemcacheInvalidate --- PASS: TestMemcacheInvalidate (0.00s) === RUN TestMemcacheInvalidateWhenError --- PASS: TestMemcacheInvalidateWhenError (0.00s) === RUN TestMemcacheClear --- PASS: TestMemcacheClear (0.00s) === RUN TestMemcacheClearWhenError --- PASS: TestMemcacheClearWhenError (0.00s) === RUN TestMemcacheGetType --- PASS: TestMemcacheGetType (0.00s) === RUN TestOptionsCostValue --- PASS: TestOptionsCostValue (0.00s) === RUN TestOptionsExpirationValue --- PASS: TestOptionsExpirationValue (0.00s) === RUN TestOptionsTagsValue --- PASS: TestOptionsTagsValue (0.00s) === RUN TestNewRedis --- PASS: TestNewRedis (0.00s) === RUN TestRedisGet --- PASS: TestRedisGet (0.00s) === RUN TestRedisSet --- PASS: TestRedisSet (0.00s) === RUN TestRedisSetWhenNoOptionsGiven --- PASS: TestRedisSetWhenNoOptionsGiven (0.00s) === RUN TestRedisSetWithTags --- PASS: TestRedisSetWithTags (0.00s) === RUN TestRedisDelete --- PASS: TestRedisDelete (0.00s) === RUN TestRedisInvalidate --- PASS: TestRedisInvalidate (0.00s) === RUN TestRedisClear --- PASS: TestRedisClear (0.00s) === RUN TestRedisGetType --- PASS: TestRedisGetType (0.00s) === RUN TestNewRistretto --- PASS: TestNewRistretto (0.00s) === RUN TestRistrettoGet --- PASS: TestRistrettoGet (0.00s) === RUN TestRistrettoGetWhenError --- PASS: TestRistrettoGetWhenError (0.00s) === RUN TestRistrettoSet --- PASS: TestRistrettoSet (0.00s) === RUN TestRistrettoSetWhenNoOptionsGiven --- PASS: TestRistrettoSetWhenNoOptionsGiven (0.00s) === RUN TestRistrettoSetWhenError --- PASS: TestRistrettoSetWhenError (0.00s) === RUN TestRistrettoSetWithTags --- PASS: TestRistrettoSetWithTags (0.00s) === RUN TestRistrettoSetWithTagsWhenAlreadyInserted --- PASS: TestRistrettoSetWithTagsWhenAlreadyInserted (0.00s) === RUN TestRistrettoDelete --- PASS: TestRistrettoDelete (0.00s) === RUN TestRistrettoInvalidate --- PASS: TestRistrettoInvalidate (0.00s) === RUN TestRistrettoInvalidateWhenError --- PASS: TestRistrettoInvalidateWhenError (0.00s) === RUN TestRistrettoClear --- PASS: TestRistrettoClear (0.00s) === RUN TestRistrettoGetType --- PASS: TestRistrettoGetType (0.00s) PASS ok github.com/eko/gocache/store (cached) ? github.com/eko/gocache/test/mocks/cache [no test files] ? github.com/eko/gocache/test/mocks/codec [no test files] ? github.com/eko/gocache/test/mocks/metrics [no test files] ? github.com/eko/gocache/test/mocks/store [no test files] ? github.com/eko/gocache/test/mocks/store/clients [no test files] FAIL
Platforms:
Mac OS 10.14.6 Go 1.13.4
Versions:
master @ 1b6c810
The text was updated successfully, but these errors were encountered:
This is fixed by #17 Thank you so much for your help! 🙏
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
There are several data races when running the tests with the race detector enabled.
Some may simply be due to mocking, however I think a couple may be symptoms of actual bugs
Steps for Reproduction
go test -v -race ./...
Expected behavior:
Tests pass with no data races detected
Actual behavior:
Platforms:
Mac OS 10.14.6
Go 1.13.4
Versions:
master @ 1b6c810
The text was updated successfully, but these errors were encountered: