Unit test 'test_unsupported_default_store' fails on slow machine

Bug #1026047 reported by Stuart McLaren on 2012-07-18
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Low
Stuart McLaren

Bug Description

This test fails if run on a slowish machine:

======================================================================
ERROR: We test that a mis-configured default_store causes the API server
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/sam/git/openstack-glance/glance/glance/tests/utils.py", line 173, in wrapped
    func(*a, **kwargs)
  File "/home/sam/git/openstack-glance/glance/glance/tests/functional/v1/test_api.py", line 1197, in test_unsupported_default_store
    **self.__dict__.copy())
  File "/home/sam/git/openstack-glance/glance/glance/tests/functional/__init__.py", line 527, in start_server
    **kwargs)
  File "/home/sam/git/openstack-glance/glance/glance/tests/functional/__init__.py", line 139, in start
    context=overridden)
  File "/home/sam/git/openstack-glance/glance/glance/tests/utils.py", line 250, in execute
    raise RuntimeError(msg)
RuntimeError: Command ./bin/glance-control api start /tmp/test.54853/etc/api.conf --pid-file=/tmp/test.54853/api.pid --capture-output --await-child=1 did not succeed. Returned an exit code of 0.

STDOUT: Unable to increase file descriptor limit. Running as non-root?
Starting glance-api with /tmp/test.54853/etc/api.conf

Changing --await-child=1 in the code below to --await-child=3 allows the test to run ok.

    @skip_if_disabled
    def test_unsupported_default_store(self):
        """
        We test that a mis-configured default_store causes the API server
        to fail to start.
        """
        self.cleanup()
        self.default_store = 'shouldnotexist'

        # ensure failure exit code is available to assert on
        self.api_server.server_control_options += ' --await-child=1' <<<

        # ensure that the API server fails to launch
        self.start_server(self.api_server,
                          expect_launch=False,
                          expected_exitcode=255,
                          **self.__dict__.copy())

Changed in glance:
assignee: nobody → Stuart McLaren (stuart-mclaren)
Brian Waldon (bcwaldon) wrote :

I can confirm that we've seen this fail sporadically on the Jenkins test vms as well.

Changed in glance:
status: New → Triaged
importance: Undecided → Low
Changed in glance:
status: Triaged → In Progress

Reviewed: https://review.openstack.org/9958
Committed: http://github.com/openstack/glance/commit/79c298dc1b8fcec29916ea0e520835939e1f0c40
Submitter: Jenkins
Branch: master

commit 79c298dc1b8fcec29916ea0e520835939e1f0c40
Author: Stuart McLaren <email address hidden>
Date: Wed Jul 18 09:42:53 2012 +0000

    Increase wait time for test_unsupported_default_store

    Fix for LP Bug #1026047.

    Allow unit test 'test_unsupported_default_store' to
    successfully run on a slow machine.

    Change-Id: I4d49c821aeb3027b7f33babf6c4bafe00644f0c9

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2012-08-15
Changed in glance:
milestone: none → folsom-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2012-09-27
Changed in glance:
milestone: folsom-3 → 2012.2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers