Bug #14828

[crunch-dispatch-cloud] Fix flaky test

Added by Tom Clegg 9 days ago. Updated 2 days ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
Tests
Target version:
Start date:
02/14/2019
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Story points:
-

Description

https://ci.curoverse.com/job/developer-run-tests-remainder/1089/consoleFull

IntegrationSuite.TestGetLockUnlockCancel

13:32:33 queue_test.go:78:
13:32:33     c.Check(err, check.IsNil)
13:32:33 ... value *arvados.TransactionError = &arvados.TransactionError{Method:"POST", URL:url.URL{Scheme:"https", Opaque:"", User:(*url.Userinfo)(nil), Host:"0.0.0.0:37007", Path:"/arvados/v1/containers/zzzzz-dz642-queuedcontainer/lock", RawPath:"", ForceQuery:false, RawQuery:"", Fragment:""}, StatusCode:422, Status:"422 Unprocessable Entity", Errors:[]string{"#<ArvadosModel::LockFailedError: cannot lock when Cancelled>"}} ("request failed: https://0.0.0.0:37007/arvados/v1/containers/zzzzz-dz642-queuedcontainer/lock: 422 Unprocessable Entity: #<ArvadosModel::LockFailedError: cannot lock when Cancelled>")

Subtasks

Task #14839: Review 14828-fix-flaky-testResolvedTom Clegg

Associated revisions

Revision 43e8b141
Added by Tom Clegg 6 days ago

Merge branch '14828-fix-flaky-test'

fixes #14828

Arvados-DCO-1.1-Signed-off-by: Tom Clegg <>

History

#1 Updated by Tom Clegg 9 days ago

Looks like IntegrationSuite.TestCancelIfNoInstanceType returns while it still has a PUT /arvados/v1/containers/zzzzz-dz642-queuedcontainer request in progress. If the PUT request runs after the /database/reset request, its side effect (cancelling the container) leaks into IntegrationSuite.TestGetLockUnlockCancel and causes the failure.

#2 Updated by Tom Clegg 9 days ago

The problem is that an unsatisfiable container with state=Queued gets cancelled twice.

Update → addEnt → func1 → Lock → apiUpdate → addEnt → func1 → Cancel
                        → Cancel

The test exits after the first cancel succeeds, allowing the second cancel to happen later.

#3 Updated by Tom Clegg 7 days ago

  • Target version changed from 2019-02-13 Sprint to 2019-02-27 Sprint

#5 Updated by Lucas Di Pentima 6 days ago

LGTM, please merge. Thanks!

#6 Updated by Tom Clegg 6 days ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF