760b39e324
Avoid test failures like this one: === RUN TestService_OnPayload ================== WARNING: DATA RACE Read at 0x00c00015a843 by goroutine 112: testing.(*common).logDepth() /usr/local/go/src/testing/testing.go:665 +0xa1 testing.(*common).Logf() /usr/local/go/src/testing/testing.go:658 +0x8f testing.(*T).Logf() <autogenerated>:1 +0x75 go.uber.org/zap/zaptest.testingWriter.Write() /go/pkg/mod/go.uber.org/zap@v1.10.0/zaptest/logger.go:130 +0x11f go.uber.org/zap/zaptest.(*testingWriter).Write() <autogenerated>:1 +0xa9 go.uber.org/zap/zapcore.(*ioCore).Write() /go/pkg/mod/go.uber.org/zap@v1.10.0/zapcore/core.go:90 +0x1c3 go.uber.org/zap/zapcore.(*CheckedEntry).Write() /go/pkg/mod/go.uber.org/zap@v1.10.0/zapcore/entry.go:215 +0x1e7 go.uber.org/zap.(*Logger).Info() /go/pkg/mod/go.uber.org/zap@v1.10.0/logger.go:187 +0x95 github.com/CityOfZion/neo-go/pkg/core.(*Blockchain).persist() /go/src/github.com/CityOfZion/neo-go/pkg/core/blockchain.go:720 +0x6bb github.com/CityOfZion/neo-go/pkg/core.(*Blockchain).Run.func2() /go/src/github.com/CityOfZion/neo-go/pkg/core/blockchain.go:228 +0x53 Previous write at 0x00c00015a843 by goroutine 98: testing.tRunner.func1() /usr/local/go/src/testing/testing.go:900 +0x353 testing.tRunner() /usr/local/go/src/testing/testing.go:913 +0x1bb Goroutine 112 (running) created at: github.com/CityOfZion/neo-go/pkg/core.(*Blockchain).Run() /go/src/github.com/CityOfZion/neo-go/pkg/core/blockchain.go:227 +0x264 Goroutine 98 (finished) created at: testing.(*T).Run() /usr/local/go/src/testing/testing.go:960 +0x651 testing.runTests.func1() /usr/local/go/src/testing/testing.go:1202 +0xa6 testing.tRunner() /usr/local/go/src/testing/testing.go:909 +0x199 testing.runTests() /usr/local/go/src/testing/testing.go:1200 +0x521 testing.(*M).Run() /usr/local/go/src/testing/testing.go:1117 +0x2ff main.main() _testmain.go:162 +0x337 ================== --- FAIL: TestService_OnPayload (4.11s) |
||
---|---|---|
.. | ||
testdata | ||
block.go | ||
block_test.go | ||
cache.go | ||
cache_test.go | ||
change_view.go | ||
change_view_test.go | ||
commit.go | ||
commit_test.go | ||
consensus.go | ||
consensus_test.go | ||
crypto.go | ||
crypto_test.go | ||
payload.go | ||
payload_test.go | ||
prepare_request.go | ||
prepare_request_test.go | ||
prepare_response.go | ||
prepare_response_test.go | ||
recovery_message.go | ||
recovery_message_test.go | ||
recovery_request.go | ||
recovery_request_test.go |