mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-11 04:00:05 +00:00
Fix data races in tests accessing beacon config concurrently (#8190)
* add mutex to params/config * split config files into test/prod * add tags checker * add regression test * remove debug info * update bazel config * go fmt * make sure that conditional file is kept by gazelle * update build tag: test -> develop * gazelle * remove redundant import * fix data race in TestService_ReceiveBlock
This commit is contained in:
parent
f67f8dd6df
commit
318f83957a
@ -79,6 +79,7 @@ go_test(
|
|||||||
srcs = [
|
srcs = [
|
||||||
"blockchain_test.go",
|
"blockchain_test.go",
|
||||||
"chain_info_test.go",
|
"chain_info_test.go",
|
||||||
|
"checktags_test.go",
|
||||||
"head_test.go",
|
"head_test.go",
|
||||||
"info_test.go",
|
"info_test.go",
|
||||||
"metrics_test.go",
|
"metrics_test.go",
|
||||||
@ -90,6 +91,7 @@ go_test(
|
|||||||
"weak_subjectivity_checks_test.go",
|
"weak_subjectivity_checks_test.go",
|
||||||
],
|
],
|
||||||
embed = [":go_default_library"],
|
embed = [":go_default_library"],
|
||||||
|
gotags = ["develop"],
|
||||||
deps = [
|
deps = [
|
||||||
"//beacon-chain/blockchain/testing:go_default_library",
|
"//beacon-chain/blockchain/testing:go_default_library",
|
||||||
"//beacon-chain/cache/depositcache:go_default_library",
|
"//beacon-chain/cache/depositcache:go_default_library",
|
||||||
@ -126,6 +128,7 @@ go_test(
|
|||||||
name = "go_raceon_test",
|
name = "go_raceon_test",
|
||||||
srcs = [
|
srcs = [
|
||||||
"chain_info_norace_test.go",
|
"chain_info_norace_test.go",
|
||||||
|
"checktags_test.go",
|
||||||
"receive_block_test.go",
|
"receive_block_test.go",
|
||||||
"service_norace_test.go",
|
"service_norace_test.go",
|
||||||
],
|
],
|
||||||
@ -137,6 +140,7 @@ go_test(
|
|||||||
# See: https://github.com/etcd-io/bbolt/issues/187.
|
# See: https://github.com/etcd-io/bbolt/issues/187.
|
||||||
"-d=checkptr=0",
|
"-d=checkptr=0",
|
||||||
],
|
],
|
||||||
|
gotags = ["develop"],
|
||||||
race = "on",
|
race = "on",
|
||||||
tags = ["race_on"],
|
tags = ["race_on"],
|
||||||
deps = [
|
deps = [
|
||||||
|
7
beacon-chain/blockchain/checktags_test.go
Normal file
7
beacon-chain/blockchain/checktags_test.go
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
// +build !develop
|
||||||
|
|
||||||
|
package blockchain
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
log.Fatal("Tests in this package require extra build tag: re-run with `-tags develop`")
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user