Unit test failures when building debian package

Bug #1494722 reported by Thomas Goirand
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Murano
Fix Released
High
Kirill Zaitsev
Liberty
Fix Released
High
Kirill Zaitsev
Mitaka
Fix Released
High
Kirill Zaitsev

Bug Description

When building the Liberty b3 debian package, the below unit test is failing. I have blacklisted it in my package.

FAIL: murano.tests.unit.packages.hot_package.test_hot_package.TestHotPackage.test_heat_files_generated
murano.tests.unit.packages.hot_package.test_hot_package.TestHotPackage.test_heat_files_generated
----------------------------------------------------------------------
_StringException: Empty attachments:
  pythonlogging:'murano'

Traceback (most recent call last):
  File "murano/tests/unit/packages/hot_package/test_hot_package.py", line 39, in test_heat_files_generated
    self.assertEqual(expected_result, files, msg)
  File "/usr/lib/python2.7/dist-packages/testtools/testcase.py", line 350, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/usr/lib/python2.7/dist-packages/testtools/testcase.py", line 435, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: !=:
reference = ['testHeatFile',
 'middle_file/testHeatFile',
 'middle_file/inner_file/testHeatFile',
 'middle_file/inner_file2/testHeatFile']
actual = ['testHeatFile',
 'middle_file/testHeatFile',
 'middle_file/inner_file2/testHeatFile',
 'middle_file/inner_file/testHeatFile']
: hot files were not generated correctly

Revision history for this message
Ekaterina Chernova (efedorova) wrote :

It' very hard to reproduce your problem. could you provide environment details?
can you attach pip freeze at least?-

Changed in murano:
importance: Undecided → Medium
status: New → Incomplete
milestone: none → next
Revision history for this message
Bluntknife (bluntknife) wrote :

I have exactly the same error message.
Manually installing Murano on 14.04 server.

==============================
Failed 1 tests - output below:
==============================

packages.hot_package.test_hot_package.TestHotPackage.test_heat_files_generated
------------------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "/etc/murano/murano/tests/unit/packages/hot_package/test_hot_package.py", line 39, in test_heat_files_generated
        self.assertEqual(expected_result, files, msg)
      File "/etc/murano/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 350, in assertEqual
        self.assertThat(observed, matcher, message)
      File "/etc/murano/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 435, in assertThat
        raise mismatch_error
    testtools.matchers._impl.MismatchError: !=:
    reference = ['testHeatFile',
     'middle_file/testHeatFile',
     'middle_file/inner_file/testHeatFile',
     'middle_file/inner_file2/testHeatFile']
    actual = ['testHeatFile',
     'middle_file/testHeatFile',
     'middle_file/inner_file2/testHeatFile',
     'middle_file/inner_file/testHeatFile']
    : hot files were not generated correctly

======
Totals
======
Ran: 339 tests in 17.0000 sec.
 - Passed: 335
 - Skipped: 3
 - Expected Fail: 0
 - Unexpected Success: 0
 - Failed: 1
Sum of execute time for each test: 23.6221 sec.

==============
Worker Balance
==============
 - Worker 0 (170 tests) => 0:00:11.907447
 - Worker 1 (169 tests) => 0:00:13.057237
ERROR: InvocationError: '/bin/bash tools/pretty_tox.sh '

Changed in murano:
milestone: next → liberty-rc1
Revision history for this message
Thomas Goirand (thomas-goirand) wrote :

Hi.

My build environment is simply Debian Experimental. Just get the source package from there, edit debian/rules to remove the failed unit test from subunit blacklist, and run git-buildpackage.

If you want to know more about building and working on packages, I wrote some text over here too:
http://openstack.alioth.debian.org/

Cheers,

Thomas Goirand (zigo)

Changed in murano:
milestone: liberty-rc1 → mitaka-1
Revision history for this message
Thomas Goirand (thomas-goirand) wrote :

Serg,

I don't agree that you should postpone this issue to Mitaka-1. At least 2 persons (myself and someone in Ubuntu) saw the error. If you think the unit test can't be fixed, at least skip it until this is fixed.

Changed in murano:
milestone: mitaka-1 → liberty-rc2
Changed in murano:
assignee: nobody → Kirill Zaitsev (kzaitsev)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to murano (master)

Fix proposed to branch: master
Review: https://review.openstack.org/229827

Changed in murano:
status: Incomplete → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to murano (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/229829

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to murano (stable/liberty)

Reviewed: https://review.openstack.org/229829
Committed: https://git.openstack.org/cgit/openstack/murano/commit/?id=a21144e5ca964ce35956cb29327e97bb57acd86e
Submitter: Jenkins
Branch: stable/liberty

commit a21144e5ca964ce35956cb29327e97bb57acd86e
Author: Kirill Zaitsev <email address hidden>
Date: Thu Oct 1 13:46:13 2015 +0300

    Test hot package files with sets instead of lists

    Before test_hot_package file used lists for testing which files were
    generated. This could potentially lead to false negatives, as os.walk
    returns file names in arbitrary order.
    This commit replaces lists with sets to mitigate the problem.
    Renames _build_hot_resources_dict as it does not return a dict.

    Change-Id: I348d5c5bbf0db0d4d734d07a5449e6f3d171fcbf
    Closes-Bug: #1494722

Changed in murano:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to murano (master)

Reviewed: https://review.openstack.org/229827
Committed: https://git.openstack.org/cgit/openstack/murano/commit/?id=092cbb2af4bcaba26c9b16cd68c8530355a6ac34
Submitter: Jenkins
Branch: master

commit 092cbb2af4bcaba26c9b16cd68c8530355a6ac34
Author: Kirill Zaitsev <email address hidden>
Date: Thu Oct 1 13:46:13 2015 +0300

    Test hot package files with sets instead of lists

    Before test_hot_package file used lists for testing which files were
    generated. This could potentially lead to false negatives, as os.walk
    returns file names in arbitrary order.
    This commit replaces lists with sets to mitigate the problem.
    Renames _build_hot_resources_dict as it does not return a dict.

    Change-Id: I348d5c5bbf0db0d4d734d07a5449e6f3d171fcbf
    Closes-Bug: #1494722

Changed in murano:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.