prometheus / prometheus/client_python
TestGauge::test_time_block_decorator_with_label failure
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 4.4k
- Fork
- 876
- Merge medio
- 8g 4h
- PR unite (30g)
- 1
Descrizione
Hi, I am running the test suite on some obscure architectures and observed a failure on alpha, with one test:
========================================================================= FAILURES =========================================================================
______________________________________________________ TestGauge.test_time_block_decorator_with_label ______________________________________________________
self = <tests.test_core.TestGauge testMethod=test_time_block_decorator_with_label>
def test_time_block_decorator_with_label(self):
value = self.registry.get_sample_value
self.assertEqual(None, value('g2', {'label1': 'foo'}))
with self.gauge_with_label.time() as metric:
metric.labels('foo')
> self.assertLess(0, value('g2', {'label1': 'foo'}))
E AssertionError: 0 not less than 0.0
metric = <prometheus_client.context_managers.Timer object at 0x20007441790>
self = <tests.test_core.TestGauge testMethod=test_time_block_decorator_with_label>
value = <bound method CollectorRegistry.get_sample_value of <prometheus_client.registry.CollectorRegistry object at 0x20007441310>>
tests/test_core.py:255: AssertionError
This is fully reproducible, and I tested on both python3.10 and python3.11 with same results.
Complete log: 41y0768.log
Any help on why this test could be failing? I know this is an unusual platform, so I can provide shell access to the machine in question if somebody would mind taking a look. I can also interactively debug, or test patches as needed.
Thank you!
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia da tests/test_core.py:255 e dal test TestGauge.test_time_block_decorator_with_label. Riproduci il fallimento sulla piattaforma alpha indicata con Python 3.10 o 3.11, quindi esamina il file 41y0768.log completo e il comportamento temporale di gauge. Il lavoro è completato quando la causa specifica della piattaforma è stata identificata e il test passa senza regressioni nel comportamento indicato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- testing-qa
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 42/100