Skip to content

Commit

Permalink
Test fix: request timeout can happen after
Browse files Browse the repository at this point in the history
because it's checked every 100 ms
  • Loading branch information
emasab committed Jan 16, 2023
1 parent 6dbb0fb commit cd144c2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions kafka/adminapi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func testAdminAPIsCreateACLs(what string, a *AdminClient, t *testing.T) {
}

t.Logf("AdminClient API - ACLs testing on %s: %s", a, what)
expDuration, err = time.ParseDuration("0.1s")
expDuration, err = time.ParseDuration("0.5s")
if err != nil {
t.Fatalf("%s", err)
}
Expand Down Expand Up @@ -141,7 +141,7 @@ func testAdminAPIsCreateACLs(what string, a *AdminClient, t *testing.T) {
}

// request timeout comes before context deadline
expDurationLonger, err = time.ParseDuration("0.2s")
expDurationLonger, err = time.ParseDuration("1s")
if err != nil {
t.Fatalf("%s", err)
}
Expand Down Expand Up @@ -229,7 +229,7 @@ func testAdminAPIsDescribeACLs(what string, a *AdminClient, t *testing.T) {
}

t.Logf("AdminClient API - ACLs testing on %s: %s", a, what)
expDuration, err = time.ParseDuration("0.1s")
expDuration, err = time.ParseDuration("0.5s")
if err != nil {
t.Fatalf("%s", err)
}
Expand All @@ -245,7 +245,7 @@ func testAdminAPIsDescribeACLs(what string, a *AdminClient, t *testing.T) {
}

// request timeout comes before context deadline
expDurationLonger, err = time.ParseDuration("0.2s")
expDurationLonger, err = time.ParseDuration("1s")
if err != nil {
t.Fatalf("%s", err)
}
Expand Down Expand Up @@ -331,7 +331,7 @@ func testAdminAPIsDeleteACLs(what string, a *AdminClient, t *testing.T) {
}

t.Logf("AdminClient API - ACLs testing on %s: %s", a, what)
expDuration, err = time.ParseDuration("0.1s")
expDuration, err = time.ParseDuration("0.5s")
if err != nil {
t.Fatalf("%s", err)
}
Expand Down Expand Up @@ -363,7 +363,7 @@ func testAdminAPIsDeleteACLs(what string, a *AdminClient, t *testing.T) {
}

// request timeout comes before context deadline
expDurationLonger, err = time.ParseDuration("0.2s")
expDurationLonger, err = time.ParseDuration("1s")
if err != nil {
t.Fatalf("%s", err)
}
Expand Down

0 comments on commit cd144c2

Please sign in to comment.