Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions functional_consumer_staticmembership_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,6 @@ func TestFuncConsumerGroupStaticMembership_RejoinAndLeave(t *testing.T) {
if err != nil {
t.Fatal(err)
}
if err != nil {
t.Fatal(err)
}
if len(res3) != 1 {
t.Errorf("group description should be only 1, got %v\n", len(res3))
}
Expand All @@ -148,7 +145,7 @@ func TestFuncConsumerGroupStaticMembership_RejoinAndLeave(t *testing.T) {

generationId3 := m1.generationId.Load()
if generationId3 != generationId1 {
t.Errorf("m1 generation should not increase expect %v, actual %v", generationId1, generationId2)
t.Errorf("m1 generation should not increase expect %v, actual %v", generationId1, generationId3)
}

m2.AssertCleanShutdown()
Expand All @@ -163,7 +160,7 @@ func TestFuncConsumerGroupStaticMembership_RejoinAndLeave(t *testing.T) {

generationId4 := m1.generationId.Load()
if generationId4 == generationId1 {
t.Errorf("m1 generation should increase expect %v, actual %v", generationId1, generationId2)
t.Errorf("m1 generation should increase expect %v, actual %v", generationId1, generationId4)
}
}

Expand Down
14 changes: 12 additions & 2 deletions functional_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,12 +283,22 @@ func existingEnvironment(ctx context.Context, env *testEnvironment) (bool, error
}

func tearDownDockerTestEnvironment(ctx context.Context, env *testEnvironment) error {
c := exec.Command("docker", "compose", "down", "--volumes")
args := []string{"compose", "down", "--volumes"}
v, _ := ParseKafkaVersion(env.KafkaVersion)
// use zookeeper profile for kafka < 4 to ensure zookeeper containers are stopped
if !v.IsAtLeast(V4_0_0_0) {
args = append([]string{"compose", "--profile", "zookeeper"}, args[1:]...)
}
c := exec.Command("docker", args...)
c.Stdout = os.Stdout
c.Stderr = os.Stderr
downErr := c.Run()

c = exec.Command("docker", "compose", "rm", "-v", "--force", "--stop")
args = []string{"compose", "rm", "-v", "--force", "--stop"}
if !v.IsAtLeast(V4_0_0_0) {
args = append([]string{"compose", "--profile", "zookeeper"}, args[1:]...)
}
c = exec.Command("docker", args...)
c.Stdout = os.Stdout
c.Stderr = os.Stderr
rmErr := c.Run()
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ require (
)

require (
github.com/golang/snappy v0.0.4 // indirect
github.com/golang/snappy v1.0.0 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/jcmturner/aescts/v2 v2.0.0 // indirect
github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc=
github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I=
github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw=
github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g=
github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v1.0.0 h1:Oy607GVXHs7RtbggtPBnr2RmDArIsAefDwvrdWvRhGs=
github.com/golang/snappy v1.0.0/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4=
github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM=
github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
Expand Down
Loading