Quobyte unit test fails sometimes: manila.tests.share.drivers.quobyte.test_jsonrpc.QuobyteJsonRpcTestCase.test_jsonrpc_call_ssl_error

Bug #1442768 reported by Ben Swartzlander
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
Low
Silvan Kaiser

Bug Description

======================================================================
FAIL: manila.tests.share.drivers.quobyte.test_jsonrpc.QuobyteJsonRpcTestCase.test_jsonrpc_call_ssl_error
----------------------------------------------------------------------
Traceback (most recent call last):
testtools.testresult.real._StringException: Empty attachments:
  pythonlogging:''
  stderr
  stdout

Traceback (most recent call last):
  File "/home/bswartz/src/manila/manila/tests/share/drivers/quobyte/test_jsonrpc.py", line 201, in test_jsonrpc_call_ssl_error
    six.text_type(me))
  File "/home/bswartz/src/manila/.venv/local/lib/python2.7/site-packages/testtools/testcase.py", line 350, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/home/bswartz/src/manila/.venv/local/lib/python2.7/site-packages/testtools/testcase.py", line 435, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: !=:
reference = 'Client SSL subsystem returned error: '
actual = u'Client SSL subsystem returned error: ()'

It seems like this test is relying a specific string from the SSL library, and on my system the SSL library is returning a slightly different string. The test could be made less fragile by changing the assertMatch to assertTrue(me.startswith('Client SSL subsystem returned error:'))

Changed in manila:
assignee: nobody → Silvan Kaiser (2-silvan)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (master)

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

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

Reviewed: https://review.openstack.org/172809
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=f5b03ae0232f26d0dd203666d0b6589e7075bb81
Submitter: Jenkins
Branch: master

commit f5b03ae0232f26d0dd203666d0b6589e7075bb81
Author: Silvan Kaiser <email address hidden>
Date: Mon Apr 13 08:51:20 2015 +0200

    More flexible matching in SSL error test

    Change assert match string to be more flexible in
    QuobyteJsonRpcTestCase.test_jsonrpc_call_ssl_error .
    Instead of matching the whole string match based on
    startswith in order not to fail on different SSL libraries.

    Change-Id: I4021a742d0e9b7e59e0da73ac22c1a37fda542ba
    Closes-Bug: 1442768

Changed in manila:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in manila:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in manila:
milestone: liberty-1 → 1.0.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.