Commit d90d38ea authored by Stan Hu's avatar Stan Hu

Fix race condition in httprs test

The `So(server, ShouldNotBeNil)` call in the httprs test attempts to
print a string representation of the `server`, but this is racy because
the reconnection state is initialized in a
Goroutine. `httptest.NewServer()` always returns a valid value, so we
can drop this test.

Relates to https://gitlab.com/gitlab-org/gitlab-workhorse/-/issues/285
parent aa34b2ac
---
title: Fix race condition in httprs test
merge_request: 584
author:
type: fixed
......@@ -111,7 +111,6 @@ func TestHttpWebServer(t *testing.T) {
So(err, ShouldBeNil)
server := httptest.NewServer(http.FileServer(http.Dir(dir)))
So(server, ShouldNotBeNil)
Convey("When requesting /file", func() {
res, err := http.Get(server.URL + "/file")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment