Avoid http client race in test case.
[arvados.git] / services / keepstore / handler_test.go
index 424910dfa8b2af4a0d22ad9e91bd4eab20076af7..f012ea3902217c55502d7aebe12b072d004985ec 100644 (file)
@@ -975,7 +975,7 @@ func TestGetHandlerClientDisconnect(t *testing.T) {
        ok := make(chan struct{})
        go func() {
                req, _ := http.NewRequest("GET", fmt.Sprintf("/%s+%d", TestHash, len(TestBlock)), nil)
-               (&LoggingRESTRouter{router: MakeRESTRouter()}).ServeHTTP(resp, req)
+               MakeRESTRouter().ServeHTTP(resp, req)
                ok <- struct{}{}
        }()
 
@@ -1107,7 +1107,7 @@ func TestUntrashHandler(t *testing.T) {
        response = IssueRequest(datamanagerWrongMethodReq)
        ExpectStatusCode(t,
                "Only PUT method is supported for untrash",
-               http.StatusBadRequest,
+               http.StatusMethodNotAllowed,
                response)
 
        // datamanagerReq => StatusOK