api unittest failed when proxy enabled

Bug #1411493 reported by Lianhao Lu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
Low
Lianhao Lu

Bug Description

When we have proxy enabled in the OS, e.g. having set environment variable http_proxy, the unit test ceilometer.tests.test_bin.BinApiTestCase.test_v2 would fail as the following output:

ERROR: ceilometer.tests.test_bin.BinApiTestCase.test_v2
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/stack/ceilometer/ceilometer/tests/test_bin.py", line 207, in test_v2
    self.assertEqual([], json.loads(content))
  File "/usr/lib/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

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

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

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

Reviewed: https://review.openstack.org/147735
Committed: https://git.openstack.org/cgit/openstack/ceilometer/commit/?id=04e6220d797935abb772f321252fd6ca38acaf8f
Submitter: Jenkins
Branch: master

commit 04e6220d797935abb772f321252fd6ca38acaf8f
Author: Lianhao Lu <email address hidden>
Date: Fri Jan 16 11:18:34 2015 +0800

    Disable proxy in unit test case of test_bin

    Do not use system proxy in unit test cases in test_bin.

    Change-Id: Ic64ca777e7f5784122e9a3d539580dc7d17f9265
    Closes-Bug: #1411493

Changed in ceilometer:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in ceilometer:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: kilo-2 → 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.