Project

General

Profile

Bug #30336

Fix timeout issue in React content view test

Added by John Mitsch over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Tests
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

[2020-07-06T21:18:16.731Z] 240 | fireEvent.change(getByLabelText(/text input for search/i), { target: { value: query } });
[2020-07-06T21:18:16.731Z] 241 |
[2020-07-06T21:18:16.731Z] > 242 | await waitFor(() => expect(getByText(/No matching Content Views found/i)).toBeInTheDocument());
[2020-07-06T21:18:16.731Z] | ^
[2020-07-06T21:18:16.731Z] 243 |
[2020-07-06T21:18:16.731Z] 244 | assertNockRequest(autocompleteScope);
[2020-07-06T21:18:16.731Z] 245 | assertNockRequest(initialScope);
[2020-07-06T21:18:16.731Z]
[2020-07-06T21:18:16.731Z] at waitForWrapper (foreman/node_modules/@testing-library/dom/dist/wait-for.js:134:27)
[2020-07-06T21:18:16.731Z] at callee8$ (webpack/scenes/ContentViews/_tests__/contentViewPage.test.js:242:9)
[2020-07-06T21:18:16.731Z] at tryCatch (foreman/node_modules/regenerator-runtime/runtime.js:45:40)
[2020-07-06T21:18:16.731Z] at Generator.invoke [as invoke] (foreman/node_modules/regenerator-runtime/runtime.js:274:22)
[2020-07-06T21:18:16.731Z] at Generator.prototype.<computed> [as next] (foreman/node_modules/regenerator-runtime/runtime.js:97:21)
[2020-07-06T21:18:16.731Z] at asyncGeneratorStep (webpack/scenes/ContentViews/
_tests__/contentViewPage.tes

Associated revisions

Revision bab3adfd (diff)
Added by John Mitsch over 1 year ago

Fixes #30336 - Fix React test intermittent failure

We are seeing this issue happen with jenkins, it seems to run quite a bit slower than GH actions.

I believe the `waitFor` command is timing out as it waits for the text to appear on the screen. react-testing-library doesn't have a way to increase the default (1000ms) waitFor afaict, so we can set it in the waitFor commands where needed. If it continues to be a problem, we can think about making a wrapper function that calls waitFor with a longer timeout.

History

#1 Updated by The Foreman Bot over 1 year ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/8813 added

#2 Updated by John Mitsch over 1 year ago

  • Description updated (diff)

#3 Updated by The Foreman Bot over 1 year ago

  • Fixed in Releases Katello 4.0.0 added

#4 Updated by John Mitsch over 1 year ago

  • Status changed from Ready For Testing to Closed

#5 Updated by John Mitsch over 1 year ago

  • Triaged changed from No to Yes
  • Target version set to Katello 3.16.0

#6 Updated by Ian Ballou over 1 year ago

  • Target version changed from Katello 3.16.0 to Katello 4.0.0

#7 Updated by Chris Roberts over 1 year ago

  • Target version changed from Katello 4.0.0 to Katello 3.17.0

Also available in: Atom PDF