Skip to content

Commit

Permalink
Progress bar causes intermittent test failures
Browse files Browse the repository at this point in the history
I'm seeing intermittent failures on:

  glance.tests.functional.test_misc:TestMiscellaneous
    test_api_treats_size_as_a_normal_property

with a 'glance show' command failing with:

  STDERR: /bin/sh: line 1: $'\b\b\b\b\b\b[100%]': command not found

apparently due to leakage of the progress bar output associated
with the previously executed 'glance add' command.

For the same reason, I see failures on:

  glance.tests.functional.test_bin_glance:TestBinGlance
    test_show_image_format

Work-around by enabling silent-upload so that test are reliably green.

Change-Id: Ib23e0a1f042d8e7950bddc485696a69338cf8620
  • Loading branch information
Eoghan Glynn committed Feb 28, 2012
1 parent b563deb commit 63f3af7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
8 changes: 2 additions & 6 deletions glance/tests/functional/test_bin_glance.py
Original file line number Diff line number Diff line change
Expand Up @@ -880,12 +880,8 @@ def test_show_image_format(self):
image_file.write("XXX")
image_file.flush()
image_file_name = image_file.name
cmd = "bin/glance --port=%d add is_public=True"\
" disk_format=raw container_format=ovf " \
" name=MyImage < %s" % (api_port, image_file_name)
cmd = minimal_add_command(api_port,
'MyImage',
'< %s' % image_file_name)
suffix = ' --silent-upload < %s' % image_file_name
cmd = minimal_add_command(api_port, 'MyImage', suffix)

exitcode, out, err = execute(cmd)

Expand Down
5 changes: 2 additions & 3 deletions glance/tests/functional/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,8 @@ def test_api_treats_size_as_a_normal_property(self):
image_file.write("XXX")
image_file.flush()
image_file_name = image_file.name
cmd = minimal_add_command(self.api_port,
'MyImage',
'size=12345 < %s' % image_file_name)
suffix = 'size=12345 --silent-upload < %s' % image_file_name
cmd = minimal_add_command(self.api_port, 'MyImage', suffix)

exitcode, out, err = execute(cmd)

Expand Down

0 comments on commit 63f3af7

Please sign in to comment.