Skip to content

Commit ead942d

Browse files
committed
add integration tests for slurmctld stats
1 parent d55460a commit ead942d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/integration/test_slurmctld.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,16 @@ def test_fair_share_dampening_factor():
107107
with pytest.raises(pyslurm.RPCError,
108108
match=r"Invalid Dampening*"):
109109
slurmctld.set_fair_share_dampening_factor(99999999)
110+
111+
112+
def test_statistics():
113+
stats = slurmctld.diag()
114+
assert stats.to_dict()
115+
assert len(stats.rpcs_by_type) > 0
116+
data_since = stats.data_since
117+
118+
slurmctld.Statistics.reset()
119+
new_stats = slurmctld.Statistics.load()
120+
assert new_stats.to_dict()
121+
# Check that resetting it was actually sucessful.
122+
assert data_since < new_stats.data_since

0 commit comments

Comments
 (0)