File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed
Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -242,7 +242,29 @@ async def test_record_connection_health(self):
242242
243243 @pytest .mark .asyncio
244244 async def test_get_stats_no_data (self ):
245- """Test get_stats with no data."""
245+ """
246+ Test get_stats with no data.
247+
248+ What this tests:
249+ ---------------
250+ 1. Empty stats dictionary structure
251+ 2. No errors with zero metrics
252+ 3. Consistent stat categories
253+ 4. Safe empty state handling
254+
255+ Why this matters:
256+ ----------------
257+ - Graceful startup behavior
258+ - No NPEs in monitoring code
259+ - Consistent API responses
260+ - Clean initial state
261+
262+ Additional context:
263+ ---------------------------------
264+ - Returns valid structure even if empty
265+ - All stat categories present
266+ - Zero values, not null/missing
267+ """
246268 collector = InMemoryMetricsCollector ()
247269 stats = await collector .get_stats ()
248270
You can’t perform that action at this time.
0 commit comments