prometheus / prometheus/client_python
TestGauge::test_time_block_decorator_with_label failure
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 4.4k
- フォーク
- 876
- 平均マージ
- 8日 4時間
- マージ済み PR(30日)
- 1
説明
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!
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
tests/test_core.py:255 と TestGauge.test_time_block_decorator_with_label テストから始めます。Python 3.10 または 3.11 で報告された alpha プラットフォーム上の失敗を再現し、その後、完全な 41y0768.log と gauge のタイミング動作を調査します。プラットフォーム固有の原因を特定し、報告された動作を後退させることなくテストが成功すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- testing-qa
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100