Skip to content

Commit 6f47281

Browse files
committed
Add xfail test for crash group 3653
Change-Id: I2a937355d0ebc071a2cca9a892f1e4d2f659dd1c
1 parent a4a5dcb commit 6f47281

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

tests/unit/cmk/plugins/oracle/agent_based/test_oracle_instance_uptime.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,29 @@ def test_check_oracle_instance_uptime_error() -> None:
9090
)
9191

9292

93+
@pytest.mark.xfail(strict=True, reason="Crash group 3653: ValueError on negative up_seconds")
94+
def test_check_oracle_instance_uptime_negative_uptime() -> None:
95+
"""Negative up_seconds from Oracle causes ValueError in render.timespan."""
96+
with time_machine.travel(datetime.datetime.fromtimestamp(1643360266, tz=ZoneInfo("UTC"))):
97+
results = list(
98+
check_plugin_oracle_instance_uptime.check_function(
99+
item="OBIP",
100+
params={},
101+
section={
102+
"OBIP": Instance(
103+
sid="OBIP",
104+
version="203.0.0.1.0",
105+
openmode="OPEN",
106+
logins="ALLOWED",
107+
up_seconds=-6689,
108+
),
109+
},
110+
)
111+
)
112+
# Should not crash — negative uptime is an anomaly but should be handled gracefully
113+
assert any(isinstance(r, Result) for r in results)
114+
115+
93116
def test_check_oracle_instance_uptime_pdb_mounted() -> None:
94117
with time_machine.travel(datetime.datetime.fromtimestamp(1643360266, tz=ZoneInfo("UTC"))):
95118
assert list(

0 commit comments

Comments
 (0)