Actions
Bug #21276
closedlib/controller/handler_test.go TestDiscoveryDocCache is racey
Status:
Resolved
Priority:
Normal
Assigned To:
Category:
Tests
Target version:
Story points:
-
Release:
Release relationship:
Auto
Description
time="2023-12-07T19:12:30Z" level=warning msg="error refreshing cache" error="HTTP status 400" path=/discovery/v1/apis/arvados/v1/rest ---------------------------------------------------------------------- FAIL: handler_test.go:100: HandlerSuite.TestDiscoveryDocCache handler_test.go:257: // Only one attempt to re-fetch (holdReqs ensured the first // update took long enough for the last incoming request to // arrive) c.Check(countRailsReqs(), check.Equals, reqsBefore+1) ... obtained int = 10 ... expected int = 11
Files
Related issues
Updated by Tom Clegg 11 months ago
- Assigned To set to Tom Clegg
- Status changed from New to In Progress
I repeated the test 100+ times without reproducing this error, then eventually got a similar failure a few lines down:
START: handler_test.go:100: HandlerSuite.TestDiscoveryDocCache START: handler_test.go:49: HandlerSuite.SetUpTest PASS: handler_test.go:49: HandlerSuite.SetUpTest 0.002s {"level":"debug","msg":"interval is 0s, not running worker","time":"2023-12-18T16:35:12.145031309-05:00","worker":"trash sweep"} {"level":"debug","msg":"interval is 0s, not running worker","time":"2023-12-18T16:35:12.145037610-05:00","worker":"container log sweep"} WARN[0001] error refreshing cache error="HTTP status 400" path=/discovery/v1/apis/arvados/v1/rest WARN[0001] error refreshing cache error="HTTP status 400" path=/discovery/v1/apis/arvados/v1/rest handler_test.go:286: c.Check(countRailsReqs(), check.Equals, reqsBefore+5) ... obtained int = 18 ... expected int = 17 START: handler_test.go:66: HandlerSuite.TearDownTest PASS: handler_test.go:66: HandlerSuite.TearDownTest 0.000s FAIL: handler_test.go:100: HandlerSuite.TestDiscoveryDocCache
Updated by Tom Clegg 11 months ago
- Target version changed from Future to Development 2024-01-03 sprint
21276-test-race @ 7737cf94d7f912f469a1ae7e808dbd2fb1eb6c8a -- developer-run-tests: #3976
Fixes two race bugs that caused the "number of requests" counter to occasionally miss some requests:RequestDumps = append(RequestDumps, r)
in arvadostest.Proxy needed to be protected with a mutex- Test case needed to wait for that
append()
statement to run in all of the outstanding reqs before counting RequestDumps
Updated by Brett Smith 11 months ago
Tom Clegg wrote in #note-2:
21276-test-race @ 7737cf94d7f912f469a1ae7e808dbd2fb1eb6c8a -- developer-run-tests: #3976
My only comment is it would've been cool to have your notes in the commit message, not just the ticket. But this is good to merge, thanks.
Updated by Tom Clegg 11 months ago
- % Done changed from 0 to 100
- Status changed from In Progress to Resolved
Applied in changeset arvados|e905737532244ab6f0fc8839733b7ef906b73e74.
Updated by Brett Smith 5 months ago
- Related to Bug #21927: lib/controller/handler_test.go TestDiscoveryDocCache fails intermittently added
Actions