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

Fix flaky E2E test sharding #5248

Merged
merged 1 commit into from Mar 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion endtoend/BUILD.bazel
Expand Up @@ -18,7 +18,7 @@ go_test(
"//validator",
"@com_github_ethereum_go_ethereum//cmd/geth",
],
shard_count = 3,
shard_count = 4,
tags = [
"block-network",
"e2e",
Expand Down
3 changes: 2 additions & 1 deletion endtoend/components/slasher.go
Expand Up @@ -31,8 +31,9 @@ func StartSlashers(t *testing.T) []int {

args := []string{
fmt.Sprintf("--log-file=%s", stdOutFile.Name()),
fmt.Sprintf("--rpc-port=%d", e2e.TestParams.SlasherRPCPort+i),
fmt.Sprintf("--datadir=%s/slasher-data-%d/", e2e.TestParams.TestPath, i),
fmt.Sprintf("--monitoring-port=%d", 3535+i+e2e.TestParams.TestShardIndex*100),
fmt.Sprintf("--monitoring-port=%d", e2e.TestParams.SlasherMetricsPort+i),
fmt.Sprintf("--beacon-rpc-provider=localhost:%d", e2e.TestParams.BeaconNodeRPCPort+i),
"--force-clear-db",
"--span-map-cache",
Expand Down
4 changes: 4 additions & 0 deletions endtoend/params/params.go
Expand Up @@ -20,6 +20,8 @@ type Params struct {
BeaconNodeRPCPort int
BeaconNodeMetricsPort int
ValidatorMetricsPort int
SlasherRPCPort int
SlasherMetricsPort int
}

// TestParams is the globally accessible var for getting config elements.
Expand Down Expand Up @@ -59,6 +61,8 @@ func Init(beaconNodeCount int) error {
BeaconNodeRPCPort: 4000 + testIndex*100,
BeaconNodeMetricsPort: 5000 + testIndex*100,
ValidatorMetricsPort: 6000 + testIndex*100,
SlasherRPCPort: 7000 + testIndex*100,
SlasherMetricsPort: 8000 + testIndex*100,
}
return nil
}
2 changes: 1 addition & 1 deletion slasher/flags/flags.go
Expand Up @@ -13,7 +13,7 @@ var (
// RPCPort defines a slasher node RPC port to open.
RPCPort = &cli.IntFlag{
Name: "rpc-port",
Usage: "RPC port exposed by a beacon node",
Usage: "RPC port exposed by the slasher",
Value: 5000,
}
// KeyFlag defines a flag for the node's TLS key.
Expand Down