diff options
author | Ryo Nakamura <upa@haeena.net> | 2023-05-07 21:05:05 +0900 |
---|---|---|
committer | Ryo Nakamura <upa@haeena.net> | 2023-05-07 21:05:05 +0900 |
commit | 24e86f58d87d48864e6ae33f1953124e467753ea (patch) | |
tree | 5bd65f8dd40209b6aaa08ca22c5224c059a22495 /test | |
parent | 1d3b3a2261153126832bab4276677cab6e262ed2 (diff) |
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().
Diffstat (limited to 'test')
-rw-r--r-- | test/test_python.py | 6 |
1 files changed, 6 insertions, 0 deletions
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 }, |