Skip to content

Commit fb1fce2

Browse files
authored
acc: do not fail the test if testserver failed to read the body (#3589)
This happens sometimes ``` === FAIL: acceptance TestAccept/bundle/upload/internal_server_error/DATABRICKS_CLI_DEPLOYMENT=direct-exp (0.05s) acceptance_test.go:1328: No effective updates from BundleConfig.default_name server.go:59: Failed to read request body: unexpected EOF ``` Reproducible with: `go test ./acceptance -run ^TestAccept$/^bundle$/^upload$/^internal_server_error$ -v -count=100 -failfast` The issue started after disabling rate limit in acc tests #3581 if I restore the rate limit, it does not fail even without this patch: `DATABRICKS_RATE_LIMIT=15 go test ./acceptance -run ^TestAccept$/^bundle$/^upload$/^internal_server_error$/direct -v -count=100 -failfast` succeeds.
1 parent f439a5c commit fb1fce2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

libs/testserver/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ type EncodedResponse struct {
5656
func NewRequest(t testutil.TestingT, r *http.Request, fakeWorkspace *FakeWorkspace) Request {
5757
body, err := io.ReadAll(r.Body)
5858
if err != nil {
59-
t.Fatalf("Failed to read request body: %s", err)
59+
t.Logf("Error while reading request body: %s", err)
6060
}
6161

6262
return Request{

0 commit comments

Comments
 (0)