Project

General

Profile

Actions

Bug #14828

closed

[crunch-dispatch-cloud] Fix flaky test

Added by Tom Clegg about 5 years ago. Updated about 5 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
Tests
Target version:
Story points:
-
Release relationship:
Auto

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 1 (0 open1 closed)

Task #14839: Review 14828-fix-flaky-testResolvedTom Clegg02/14/2019Actions
Actions #1

Updated by Tom Clegg about 5 years 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.

Actions #2

Updated by Tom Clegg about 5 years 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.

Actions #3

Updated by Tom Clegg about 5 years ago

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

Updated by Lucas Di Pentima about 5 years ago

LGTM, please merge. Thanks!

Actions #6

Updated by Tom Clegg about 5 years ago

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

Updated by Tom Morris about 5 years ago

  • Release set to 15
Actions

Also available in: Atom PDF