Actions
Bug #9525
closedTests can fail randomly when array order doesn't match
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
Actions