Project

General

Profile

Actions

Bug #21353

closed

I/O panel flaky test

Added by Peter Amstutz 4 months ago. Updated 3 months ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
Workbench2
Story points:
-
Release relationship:
Auto

Description

I have been seeing this failure quite a bit:

developer-run-tests-services-workbench2: #123

17:06:51   1) Process tests
17:06:51        I/O panel
17:06:51          displays IO parameters with no value:
17:06:51      AssertionError: object tested must be an array, a map, an object, a set, a string, or a weakset, but undefined given

Subtasks 1 (0 open1 closed)

Task #21398: Review 21353-loginas-flaky-bugResolvedStephen Smith01/17/2024Actions
Actions #1

Updated by Peter Amstutz 4 months ago

  • Description updated (diff)
Actions #2

Updated by Stephen Smith 4 months ago

  • Status changed from New to In Progress

Changes at arvados|96ee758154b80bd4f2a12b743e1022e8f60d03cb branch 21353-loginas-flaky-bug
Tests: developer-run-tests-services-workbench2: #414

As far as my investigation went, I found that window.location would be undefined ~10% of the time. This caused cy.url (which is an alias to cy.location('href')) to index off of undefined, and cy.location() itself would be undefined, which led to non-retryability both when asserting with cy.url and cy.location. Moving the loginAs into the .then body of createContainerRequest to make the test match others also somehow made no difference.

In order to get around window.location sometimes being undefined, I added the cypress-wait-until plugin in order to wait for cy.location to not be undefined - since the whole cy.location is wrapped in waitUntil and there are no asserts, just vanilla comparisons, waitUntil is able to retry and not permafail when window.location is undefined. I also moved the url check for /projects/ into waitUntil since it also seemed that window.location could be defined then undefined again, and that ensures it waits until the url is ready.

It also seemed to need a couple waitForDoms, one before checking for Arvados Workbench in loginAs since it seemed to be unable to get the element and failed immediately, and another in process spec after navigating to the process view.

With these changes it seems to be completely reliable now, passing 60 runs without flaking.

  • Added cypress-wait-until to wait for window.location to be defined and to replace check for /projects/ in url
  • Add waitForDom in loginAs and process spec
Actions #3

Updated by Peter Amstutz 4 months ago

  • Target version changed from Development 2024-01-17 sprint to Development 2024-01-31 sprint
Actions #4

Updated by Tom Clegg 4 months ago

This LGTM, thanks.

The updated test passes on my dev box.

I did get one failure, which I'm assuming is totally unrelated.

  1) Collection panel tests
       uses the editor (from details panel) with vocabulary terms:
     CypressError: The following error originated from your application code, not from Cypress.

  > ResizeObserver loop limit exceeded

When Cypress detects uncaught errors originating from your application it will automatically fail the current test.

This behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.

https://on.cypress.io/uncaught-exception-from-application
      at cypressErr (https://127.0.0.1:36841/__cypress/runner/cypress_runner.js:172845:18)
      at Object.errByPath (https://127.0.0.1:36841/__cypress/runner/cypress_runner.js:172896:10)
      at Object.createUncaughtException (https://127.0.0.1:36841/__cypress/runner/cypress_runner.js:161587:45)
      at $Cy.onUncaughtException (https://127.0.0.1:36841/__cypress/runner/cypress_runner.js:170409:26)
      at onError (https://127.0.0.1:36841/__cypress/runner/cypress_runner.js:169469:39)
  From Your Spec Code:
      at Context.eval (https://127.0.0.1:36841/__cypress/tests?p=cypress/integration/collection.spec.js:945:52)
Actions #5

Updated by Stephen Smith 4 months ago

  • Status changed from In Progress to Resolved
Actions #6

Updated by Peter Amstutz 3 months ago

  • Release set to 69
Actions

Also available in: Atom PDF