Project

General

Profile

Bug #9525

Tests can fail randomly when array order doesn't match

Added by Stephen Benjamin almost 5 years 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

Some things like applicable_errata return true arrays and can result in failures like http://ci.theforeman.org/job/test_katello_core/11499/database=postgresql,ruby=1.9.3/testReport/junit/%28root%29/Katello__SystemTest/test_available_and_applicable_errta/ (see below).

It seems we should be comparing array intersections or something, like (array1 & array2) == array1.

<[#<Katello::Erratum id: 94098884, uuid: "partylikeits1999", errata_id: "RHSA-1999-1231", created_at: "2015-02-24 08:02:04", updated_at: "2015-02-24 08:02:04", issued: "2015-02-21 08:02:04", updated: "2015-02-21 08:02:04", errata_type: "security", severity: "Critical", title: "World is ending", solution: nil, description: nil, summary: nil, reboot_suggested: nil>,
 #<Katello::Erratum id: 92680584, uuid: "100dividedby0", errata_id: "RHBA-2014-013", created_at: "2015-02-24 08:02:04", updated_at: "2015-02-24 08:02:04", issued: "2015-02-21 08:02:04", updated: "2015-02-21 08:02:04", errata_type: nil, severity: nil, title: "Divide by zero", solution: nil, description: nil, summary: nil, reboot_suggested: nil>]> expected but was
<[#<Katello::Erratum id: 92680584, uuid: "100dividedby0", errata_id: "RHBA-2014-013", created_at: "2015-02-24 08:02:04", updated_at: "2015-02-24 08:02:04", issued: "2015-02-21 08:02:04", updated: "2015-02-21 08:02:04", errata_type: nil, severity: nil, title: "Divide by zero", solution: nil, description: nil, summary: nil, reboot_suggested: nil>, #<Katello::Erratum id: 94098884, uuid: "partylikeits1999", errata_id: "RHSA-1999-1231", created_at: "2015-02-24 08:02:04", updated_at: "2015-02-24 08:02:04", issued: "2015-02-21 08:02:04", updated: "2015-02-21 08:02:04", errata_type: "security", severity: "Critical", title: "World is ending", solution: nil, description: nil, summary: nil, reboot_suggested: nil>]>. (test_available_and_applicable_errta)
/var/lib/workspace/workspace/test_katello_core/database/postgresql/ruby/1.9.3/plugin/test/models/system_test.rb:161    

Associated revisions

Revision fce56d28 (diff)
Added by Stephen Benjamin almost 5 years ago

fixes #9525 - add array equality assertion methods

Revision ccf4af5a
Added by Stephen Benjamin almost 5 years ago

Merge pull request #5044 from stbenjam/arrayequality

fixes #9525 - add array equality assertion methods

History

#1 Updated by The Foreman Bot almost 5 years ago

  • Status changed from New to Ready For Testing
  • Target version set to 67
  • Pull request https://github.com/Katello/katello/pull/5044 added
  • Pull request deleted ()

#2 Updated by Eric Helms almost 5 years ago

  • Legacy Backlogs Release (now unused) set to 23
  • Triaged changed from No to Yes

#3 Updated by Anonymous almost 5 years ago

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

Also available in: Atom PDF