tests failed when running tox without `--concurrency 1`

Bug #1368274 reported by Oleksii Chuprykov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Medium
Oleksii Chuprykov

Bug Description

Passage of the tests depends on the order of their execution so we can't run tests in parallel.

Sample error output:
======================================================================
FAIL: glance.tests.unit.test_swift_store.TestStoreAuthV2.test_add_large_object_zero_size
tags: worker-2
----------------------------------------------------------------------
Traceback (most recent call last):
  File "glance/tests/unit/test_swift_store.py", line 614, in test_add_large_object_zero_size
    self.assertEqual(expected_location, location)
  File "/home/ochuprykov/glance/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 348, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/home/ochuprykov/glance/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 433, in assertThat
    raise mismatch_error
MismatchError: !=:
reference = 'swift+config://ref1/glance/170ff390-bf41-443f-9cbd-a29cbdd36785'
actual = 'swift+https://tenant%3Auser1:key@localhost:8080/glance/170ff390-bf41-443f-9cbd-a29cbdd36785'

======================================================================
FAIL: glance.tests.unit.test_migrations.TestMigrations.test_walk_versions
tags: worker-1
----------------------------------------------------------------------
Traceback (most recent call last):
  File "glance/tests/unit/test_migrations.py", line 251, in test_walk_versions
    self._walk_versions(engine, self.snake_walk)
  File "glance/tests/unit/test_migrations.py", line 344, in _walk_versions
    self._migrate_down(engine, version - 1, with_data=True)
  File "glance/tests/unit/test_migrations.py", line 365, in _migrate_down
    version)
  File "/home/ochuprykov/glance/.tox/py27/local/lib/python2.7/site-packages/migrate/versioning/api.py", line 202, in downgrade
    return _migrate(url, repository, version, upgrade=False, err=err, **opts)
  File "<string>", line 2, in _migrate
  File "/home/ochuprykov/glance/.tox/py27/local/lib/python2.7/site-packages/migrate/versioning/util/__init__.py", line 160, in with_engine
    return f(*a, **kw)
  File "/home/ochuprykov/glance/.tox/py27/local/lib/python2.7/site-packages/migrate/versioning/api.py", line 366, in _migrate
    schema.runchange(ver, change, changeset.step)
  File "/home/ochuprykov/glance/.tox/py27/local/lib/python2.7/site-packages/migrate/versioning/schema.py", line 93, in runchange
    change.run(self.engine, step)
  File "/home/ochuprykov/glance/.tox/py27/local/lib/python2.7/site-packages/migrate/versioning/script/py.py", line 148, in run
    script_func(engine)
  File "/home/ochuprykov/glance/glance/db/sqlalchemy/migrate_repo/versions/004_add_checksum.py", line 84, in downgrade
    images.columns['checksum'].drop()
  File "/home/ochuprykov/glance/.tox/py27/local/lib/python2.7/site-packages/migrate/changeset/schema.py", line 592, in drop
    engine._run_visitor(visitorcallable, self, connection, **kwargs)
  File "/home/ochuprykov/glance/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1617, in _run_visitor
    conn._run_visitor(visitorcallable, element, **kwargs)
  File "/home/ochuprykov/glance/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1246, in _run_visitor
    **kwargs).traverse_single(element)
  File "/home/ochuprykov/glance/.tox/py27/local/lib/python2.7/site-packages/migrate/changeset/ansisql.py", line 56, in traverse_single
    ret = super(AlterTableVisitor, self).traverse_single(elem)
  File "/home/ochuprykov/glance/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/sql/visitors.py", line 120, in traverse_single
    return meth(obj, **kw)
  File "/home/ochuprykov/glance/.tox/py27/local/lib/python2.7/site-packages/migrate/changeset/databases/sqlite.py", line 135, in visit_column
    super(SQLiteColumnDropper,self).visit_column(column)
  File "/home/ochuprykov/glance/.tox/py27/local/lib/python2.7/site-packages/migrate/changeset/databases/sqlite.py", line 98, in visit_column
    self.recreate_table(table,column,delta)
  File "/home/ochuprykov/glance/.tox/py27/local/lib/python2.7/site-packages/migrate/changeset/databases/sqlite.py", line 85, in recreate_table
    table.create(bind=self.connection)
  File "/home/ochuprykov/glance/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/sql/schema.py", line 655, in create
    checkfirst=checkfirst)
  File "/home/ochuprykov/glance/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1246, in _run_visitor
    **kwargs).traverse_single(element)
  File "/home/ochuprykov/glance/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/sql/visitors.py", line 120, in traverse_single
    return meth(obj, **kw)
  File "/home/ochuprykov/glance/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/sql/ddl.py", line 736, in visit_table
    self.traverse_single(index)
  File "/home/ochuprykov/glance/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/sql/visitors.py", line 120, in traverse_single
    return meth(obj, **kw)
  File "/home/ochuprykov/glance/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/sql/ddl.py", line 748, in visit_index
    self.connection.execute(CreateIndex(index))
  File "/home/ochuprykov/glance/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 729, in execute
    return meth(self, multiparams, params)
  File "/home/ochuprykov/glance/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/sql/ddl.py", line 69, in _execute_on_connection
    return connection._execute_ddl(self, multiparams, params)
  File "/home/ochuprykov/glance/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 783, in _execute_ddl
    compiled
  File "/home/ochuprykov/glance/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 958, in _execute_context
    context)
  File "/home/ochuprykov/glance/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1160, in _handle_dbapi_exception
    exc_info
  File "/home/ochuprykov/glance/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 199, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb)
  File "/home/ochuprykov/glance/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 951, in _execute_context
    context)
  File "/home/ochuprykov/glance/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 436, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (OperationalError) disk I/O error u'CREATE INDEX ix_images_is_public ON images (is_public)' ()

Tags: db
Changed in glance:
assignee: nobody → Oleksii Chuprykov (ochuprykov)
Changed in glance:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/117837
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=e518ab629b9a21fe038bc4f98f559ee4479beb39
Submitter: Jenkins
Branch: master

commit e518ab629b9a21fe038bc4f98f559ee4479beb39
Author: Oleksii Chuprykov <email address hidden>
Date: Fri Aug 29 19:49:00 2014 +0300

    Refactor test_migrations module

    Refactored migration tests to use OpportunisticTestCase, removed
    unused code and ``test_migrations.conf`` file.

    The main feature of this approach is to create a new database with
    random name for each migration test. This will avoid migration tests of
    race conditions and reduce tests intersection. After this change, database
    ``openstack_citest`` will be used only for initial connection to the database.

    ``test_migrations.conf`` file not required anymore, because we create test
    database for migration test, so we no longer need to keep database credentials.

    Partial-Bug: #1368274

    Change-Id: Ib1d6dfae62cc60f814c01d07adc53f68e7c234f6

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/120828
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=868fd6e383c0a8dc7324cd7f631afb7bd8d36ea4
Submitter: Jenkins
Branch: master

commit 868fd6e383c0a8dc7324cd7f631afb7bd8d36ea4
Author: Oleksii Chuprykov <email address hidden>
Date: Thu Sep 11 19:02:38 2014 +0300

    Run tests with default concurrency 0

    Setting concurrency to 0 would enable Glance tests to be run using the
    the total number of cores on the system rather than by a single one.

    This would, by default, speed up the run time of tests for developers
    who are not aware about it. Also, any jobs which run these tests for
    Continuous Integration would be benefitted without having to deal with
    the machine level logic.

    Closes-Bug: #1368274

    Change-Id: I0842b0c0be1272d479fad9ef7609cd8a29231cb5

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
milestone: none → kilo-1
status: Fix Committed → Fix Released
Changed in glance:
importance: Undecided → Medium
Thierry Carrez (ttx)
Changed in glance:
milestone: kilo-1 → 2015.1.0
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.