Skip to content

Commit 507e276

Browse files
committed
add test for expired cache
Signed-off-by: Zen <[email protected]>
1 parent cdbe541 commit 507e276

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/test_exporter.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ def test_cached_exporter(self):
4949
e.config["metrics"] = generate_random_metric_config(100)
5050
export2 = run(e.export())
5151
self.assertEqual(export1, export2)
52+
e.cache_time = 0
53+
export3 = run(e.export())
54+
self.assertNotEqual(export1, export3)
5255

5356
def test_global_labels(self):
5457
"""Ensures that lables which are defined globally are applied to all metrics"""

0 commit comments

Comments
 (0)