Project

General

Profile

Bug #14067

Host#edit integration tests should not wait for tasks or #show graphs

Added by Daniel Lobato Garcia about 6 years ago. Updated almost 4 years ago.

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

Description

When you click on Host#edit Submit button, a few orchestration tasks will be created. After that, the show page will call (via AJAX) a few URLS to fetch 'overview', 'resources', 'nics', etc... to fill up the table on the left side. These are all irrelevant to tests that only concern the form, and pose a problem.

Problem:
The server we test on is not multithreaded, these tasks will run sequentially. Therefore, the default Capybara waiting time, or Capybara.default_max_time might not be enough to wait for all requests.

Solution:
We can stub out these calls, and wait until the #host-progress div has disappeared for POST/PATCH requests.


Related issues

Related to Foreman - Bug #13293: Intermittent host#edit parameter integration test failures after timeoutResolved2016-01-20

Associated revisions

Revision 1580adbe (diff)
Added by Daniel Lobato Garcia about 6 years ago

Fixes #14067 - Host#edit integration tests should wait for tasks

When you click on Host#edit Submit button, a few orchestration tasks
will be created. After that, the show page will call (via AJAX) a few
URLS to fetch 'overview', 'resources', 'nics', etc... to fill up the
table on the left side. These are all irrelevant to tests that only
concern the form, and pose a problem as we don't explicitly wait for
them.

Problem:
The server we test on is not multithreaded, these tasks will run
sequentially. Therefore, the default Capybara waiting time, or
Capybara.default_max_time might not be enough to wait for all requests.

Solution:
We can wait until the #host-progress div has disappeared and wait for
the Host#show ajax calls using wait_for_ajax

History

#1 Updated by Daniel Lobato Garcia about 6 years ago

  • Related to Bug #13293: Intermittent host#edit parameter integration test failures after timeout added

#3 Updated by The Foreman Bot about 6 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Daniel Lobato Garcia
  • Pull request https://github.com/theforeman/foreman/pull/3283 added

#4 Updated by Dominic Cleal about 6 years ago

  • Category changed from TFTP to Tests
  • Legacy Backlogs Release (now unused) set to 136

#5 Updated by Daniel Lobato Garcia about 6 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF