Merge pull request #1916 from molecula/test-port-conflicts

more binding to 0==less port conflicts in CI
This commit is contained in:
Matthew Jaffee 2022-02-11 14:04:52 -06:00 committed by GitHub
commit 4fb22e495c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 7 deletions

View file

@ -90,7 +90,7 @@ run go tests race:
retry: 1
script:
- echo "Running featurebase race tests..."
- go test -race -timeout=90m ./...
- go test -race -v -timeout=90m ./...
tags:
- aws

View file

@ -37,7 +37,7 @@ func TestServerConfig(t *testing.T) {
tests := []commandTest{
// TEST 0
{
args: []string{"server", "--data-dir", actualDataDir, "--bind", "localhost:42454", "--bind-grpc", "localhost:30112", "--translation.map-size", "100000"},
args: []string{"server", "--data-dir", actualDataDir, "--translation.map-size", "100000"},
env: map[string]string{
"PILOSA_DATA_DIR": "/tmp/myEnvDatadir",
"PILOSA_LONG_QUERY_TIME": "1m30s",
@ -56,6 +56,10 @@ func TestServerConfig(t *testing.T) {
[cluster]
replicas = 2
long-query-time = "1m10s"
[etcd]
listen-client-address = "http://localhost:0"
listen-peer-address = "http://localhost:0"
initial-cluster = "pilosa0=http://localhost:0"
[profile]
block-rate = 100
mutex-fraction = 10
@ -63,7 +67,6 @@ func TestServerConfig(t *testing.T) {
validation: func() error {
v := validator{}
v.Check(cmd.Server.Config.DataDir, actualDataDir)
v.Check(cmd.Server.Config.Bind, "localhost:42454")
v.Check(cmd.Server.Config.Cluster.ReplicaN, 2)
v.Check(cmd.Server.Config.LongQueryTime, toml.Duration(time.Second*90))
v.Check(cmd.Server.Config.Cluster.LongQueryTime, toml.Duration(time.Second*90))
@ -82,8 +85,6 @@ func TestServerConfig(t *testing.T) {
"--profile.mutex-fraction", "8290",
},
env: map[string]string{
"PILOSA_CLUSTER_HOSTS": "localhost:1110,localhost:1111",
"PILOSA_BIND": "localhost:1110",
"PILOSA_TRANSLATION_MAP_SIZE": "100000",
"PILOSA_PROFILE_BLOCK_RATE": "9123",
"PILOSA_PROFILE_MUTEX_FRACTION": "444",
@ -92,6 +93,10 @@ func TestServerConfig(t *testing.T) {
bind = ` + nextPort() + `
bind-grpc = ` + nextPort() + `
data-dir = "` + actualDataDir + `"
[etcd]
listen-client-address = "http://localhost:0"
listen-peer-address = "http://localhost:0"
initial-cluster = "pilosa0=http://localhost:0"
[profile]
block-rate = 100
mutex-fraction = 10
@ -110,9 +115,13 @@ func TestServerConfig(t *testing.T) {
args: []string{"server", "--log-path", logFile.Name(), "--translation.map-size", "100000"},
env: map[string]string{},
cfgFileContent: `
bind = "localhost:19444"
bind-grpc = "localhost:29444"
bind = ` + nextPort() + `
bind-grpc = ` + nextPort() + `
data-dir = "` + actualDataDir + `"
[etcd]
listen-client-address = "http://localhost:0"
listen-peer-address = "http://localhost:0"
initial-cluster = "pilosa0=http://localhost:0"
[anti-entropy]
interval = "11m0s"
[metric]
@ -191,6 +200,10 @@ func TestServerConfig_DeprecateLongQueryTime(t *testing.T) {
bind = ` + nextPort() + `
bind-grpc = ` + nextPort() + `
data-dir = "` + actualDataDir + `"
[etcd]
listen-client-address = "http://localhost:0"
listen-peer-address = "http://localhost:0"
initial-cluster = "pilosa0=http://localhost:0"
`,
validation: func() error {
v := validator{}
@ -207,6 +220,10 @@ func TestServerConfig_DeprecateLongQueryTime(t *testing.T) {
bind = ` + nextPort() + `
bind-grpc = ` + nextPort() + `
data-dir = "` + actualDataDir + `"
[etcd]
listen-client-address = "http://localhost:0"
listen-peer-address = "http://localhost:0"
initial-cluster = "pilosa0=http://localhost:0"
`,
validation: func() error {
v := validator{}
@ -223,6 +240,10 @@ func TestServerConfig_DeprecateLongQueryTime(t *testing.T) {
bind = ` + nextPort() + `
bind-grpc = ` + nextPort() + `
data-dir = "` + actualDataDir + `"
[etcd]
listen-client-address = "http://localhost:0"
listen-peer-address = "http://localhost:0"
initial-cluster = "pilosa0=http://localhost:0"
`,
validation: func() error {
v := validator{}