mirror of
https://github.com/status-im/consul.git
synced 2025-02-09 04:14:50 +00:00
test: parallelize more of TestLeader_ReapOrLeftMember_IgnoreSelf (#12468)
before: $ go test ./agent/consul -run TestLeader_ReapOrLeftMember_IgnoreSelf ok github.com/hashicorp/consul/agent/consul 21.147s after: $ go test ./agent/consul -run TestLeader_ReapOrLeftMember_IgnoreSelf ok github.com/hashicorp/consul/agent/consul 5.402s
This commit is contained in:
parent
2197a75c51
commit
6666832077
@ -275,6 +275,7 @@ func TestLeader_ReapOrLeftMember_IgnoreSelf(t *testing.T) {
|
|||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
|
||||||
run := func(t *testing.T, status serf.MemberStatus, nameFn func(string) string) {
|
run := func(t *testing.T, status serf.MemberStatus, nameFn func(string) string) {
|
||||||
|
t.Parallel()
|
||||||
dir1, s1 := testServerWithConfig(t, func(c *Config) {
|
dir1, s1 := testServerWithConfig(t, func(c *Config) {
|
||||||
c.PrimaryDatacenter = "dc1"
|
c.PrimaryDatacenter = "dc1"
|
||||||
c.ACLsEnabled = true
|
c.ACLsEnabled = true
|
||||||
@ -328,6 +329,7 @@ func TestLeader_ReapOrLeftMember_IgnoreSelf(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
t.Run("original name", func(t *testing.T) {
|
t.Run("original name", func(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
t.Run("left", func(t *testing.T) {
|
t.Run("left", func(t *testing.T) {
|
||||||
run(t, serf.StatusLeft, nil)
|
run(t, serf.StatusLeft, nil)
|
||||||
})
|
})
|
||||||
@ -337,6 +339,7 @@ func TestLeader_ReapOrLeftMember_IgnoreSelf(t *testing.T) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
t.Run("uppercased name", func(t *testing.T) {
|
t.Run("uppercased name", func(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
t.Run("left", func(t *testing.T) {
|
t.Run("left", func(t *testing.T) {
|
||||||
run(t, serf.StatusLeft, strings.ToUpper)
|
run(t, serf.StatusLeft, strings.ToUpper)
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user