Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

test_metrics fails on both python 2.7 and 3.7 #4167

Closed
pvagner opened this issue Nov 9, 2018 · 4 comments
Closed

test_metrics fails on both python 2.7 and 3.7 #4167

pvagner opened this issue Nov 9, 2018 · 4 comments

Comments

@pvagner
Copy link

pvagner commented Nov 9, 2018

Description

On both python 2.7 and python 3.7 test_metrics appear to fail for me since Synapse 0.33.8.

Steps to reproduce

  • Download a release
  • Make sure dependencies are installed
  • and run...
$ 	PYTHONPATH=. trial tests
tests.api.test_auth
  AuthTestCase
    test_blocking_mau ...                                                  [OK]
    test_single_insert_fetch ...                                           [OK]

===============================================================================
[SKIPPED]
Disabled by default because it's slow

tests.test_visibility.FilterEventsForServerTestCase.test_large_room
===============================================================================
[ERROR]
Traceback (most recent call last):
  File "/tmp/matrix-synapse/src/synapse-0.33.8/tests/test_metrics.py", line 44, in test_basic
    }, self.get_metrics_from_gauge(gauge))
  File "/tmp/matrix-synapse/src/synapse-0.33.8/tests/test_metrics.py", line 78, in get_metrics_from_gauge
    for _, labels, value in r.samples
  File "/tmp/matrix-synapse/src/synapse-0.33.8/tests/test_metrics.py", line 78, in <dictcomp>
    for _, labels, value in r.samples
exceptions.ValueError: too many values to unpack

tests.test_metrics.TestMauLimit.test_basic
-------------------------------------------------------------------------------
Ran 521 tests in 279.820s

FAILED (skips=1, errors=1, successes=519)

Version information

  • Version: 0.33.8
  • Install method: git clone
  • Platform: Arch linux witch patched glibc running as an OpenVZ container.
@richvdh
Copy link
Member

richvdh commented Nov 12, 2018

I'm pretty sure we'd notice if the problem was as simple as this: we have CI which runs the tests on every commit. Any idea what could be different between your environment and ours?

@kyrias
Copy link
Contributor

kyrias commented Nov 13, 2018

I would guess that this is due to Arch having prometheus_client 0.4.2. They switched to a named tuple for the samples in 0.4.0.

@richvdh
Copy link
Member

richvdh commented Nov 14, 2018

oh right. Well, there's a reason we pin to prometheus_client 0.3. Thanks @kyrias .

@richvdh
Copy link
Member

richvdh commented Jan 8, 2019

It sounds like the test failures were fixed by #4317

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants