From 24e86f58d87d48864e6ae33f1953124e467753ea Mon Sep 17 00:00:00 2001 From: Ryo Nakamura Date: Sun, 7 May 2023 21:05:05 +0900 Subject: mscp: maintain mscp_thread structs in list Instead of m->threads array, struct mscp_thread instanes are maintained in m->thread_list. This enables stable counter access via mscp_get_stats(). --- test/test_python.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/test_python.py') diff --git a/test/test_python.py b/test/test_python.py index ea2d278..a6b2787 100644 --- a/test/test_python.py +++ b/test/test_python.py @@ -104,6 +104,12 @@ def test_login_failed(): with pytest.raises(RuntimeError) as e: m.connect() +def test_get_stat_before_copy_start(): + m = mscp.mscp("localhost", mscp.LOCAL2REMOTE) + m.connect() + (total, done, finished) = m.stats() + assert total == 0 and done == 0 + param_invalid_kwargs = [ { "nr_threads": -1 }, -- cgit v1.2.3