nosetests failed when ZAQAR_TEST_INTEGRATION enabled

Bug #1383604 reported by peng fei wang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
zaqar
Fix Released
Medium
Flavio Percoco

Bug Description

1 modify the tests/etc/functional-tests.conf file

  set the run_server and url under [zaqar]

2. start zaqar-server

3 export ZAQAR_TEST_INTEGRATION=true

4. nosetests -v

======================================================================
FAIL: tests.functional.wsgi.v1.test_messages.TestMessages.test_message_bulk_insert_large_bodies_1__10
----------------------------------------------------------------------
_StringException: Empty attachments:
  pythonlogging:'zaqar'
  stderr

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/ddt.py", line 114, in wrapper
    return func(self, *args, **kwargs)
  File "/opt/stack/marconi/tests/functional/wsgi/v1/test_messages.py", line 261, in test_message_bulk_insert_large_bodies
    self.assertEqual(result.status_code, 201)
  File "/usr/local/lib/python2.7/dist-packages/testtools/testcase.py", line 321, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/usr/local/lib/python2.7/dist-packages/testtools/testcase.py", line 406, in assertThat
    raise mismatch_error
MismatchError: 400 != 201

there are also some other failed cases, but all of them are '400!=201'

Revision history for this message
Flavio Percoco (flaper87) wrote :
Changed in zaqar:
assignee: nobody → Flavio Percoco (flaper87)
importance: Undecided → Medium
milestone: none → kilo-1
Changed in zaqar:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to zaqar (master)

Reviewed: https://review.openstack.org/134210
Committed: https://git.openstack.org/cgit/openstack/zaqar/commit/?id=5935b6cba413789236e2414bc8a25f0beb65b4d3
Submitter: Jenkins
Branch: master

commit 5935b6cba413789236e2414bc8a25f0beb65b4d3
Author: Flavio Percoco <email address hidden>
Date: Thu Nov 13 14:38:15 2014 +0100

    Let the test client serialize request's body

    The functional test's client serializes each request content before
    sending it through the wire. The _post_large_bulk_insert used to do
    string formatting on a already serialized list, which ended up in a
    double serialization, hence the request exceeded the max size.

    The patch changes the behavior mentioned above in favor of using plain
    python objects and letting the client do the serialization step.

    Change-Id: If67422ea48eddfd9d35f06c68bac6a3e417fe214
    Closes-bug: #1383604

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

Reviewed: https://review.openstack.org/134214
Committed: https://git.openstack.org/cgit/openstack/zaqar/commit/?id=401213ab4f7c4f7a78f3bce4d369a3e4cbb53531
Submitter: Jenkins
Branch: master

commit 401213ab4f7c4f7a78f3bce4d369a3e4cbb53531
Author: Flavio Percoco <email address hidden>
Date: Thu Nov 13 14:49:43 2014 +0100

    Claim post requires a body

    One of the claim's test scenario used to send `None` to the server. The
    later failed to deserialize this body and the response returned 400.
    This patch removes `None` from the test scenario since a body is
    requires to created a claim to begin with.

    Change-Id: If2c6acefc84fb2b7cc5b4a26e1784b74a1ae1e22
    Closes-bug: #1383604

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

Reviewed: https://review.openstack.org/134236
Committed: https://git.openstack.org/cgit/openstack/zaqar/commit/?id=f0e4a810fff9abeb98a06dec39438fd10be95f31
Submitter: Jenkins
Branch: master

commit f0e4a810fff9abeb98a06dec39438fd10be95f31
Author: Flavio Percoco <email address hidden>
Date: Thu Nov 13 15:43:00 2014 +0100

    Correctly stop functional servers

    When running integration tests, the test suite starts real zaqar
    servers. The tearDown class was not stopping those servers correctly,
    which made the test suite re-use server instances when that was not
    necessary, causing other tests to fail.

    Change-Id: Ie701a8a609f8661c3607890c4b1b37ab110b155b
    Closes-bug: #1383604

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

Reviewed: https://review.openstack.org/134237
Committed: https://git.openstack.org/cgit/openstack/zaqar/commit/?id=5eda64c2617b675461fce07591c2339f6d1ca265
Submitter: Jenkins
Branch: master

commit 5eda64c2617b675461fce07591c2339f6d1ca265
Author: Flavio Percoco <email address hidden>
Date: Thu Nov 13 15:47:18 2014 +0100

    Used a pooled config for health

    In order to test all the health KPI's, it needs to run in a pooled
    deployment. Therefore, this patch re-uses a pooled config file for this
    test.

    Change-Id: I5dee61a62b0b2d021fe81aea1592b7b8f1ad4c6b
    Closes-bug: #1383604

Thierry Carrez (ttx)
Changed in zaqar:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in zaqar:
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.