diff --git a/src/luamod.rs b/src/luamod.rs index baee8b54446c5806696d0507d4ba06b0df25a8d8..6f5c6d2a9ffbe0f08d9ad9a24d7b5f35b689f796 100644 --- a/src/luamod.rs +++ b/src/luamod.rs @@ -275,31 +275,6 @@ pub(crate) fn setup(args: &args::Run) { tlua::function0(|| traft::node::global().map(|n| n.status())), ); - /////////////////////////////////////////////////////////////////////////// - // FIXME: too many statuses - luamod_set( - &l, - "_governor_loop_status", - indoc! {" - pico._governor_loop_status() - ================== - - Returns the governor loop status. - - Returns: - - (string) - or - (nil, string) in case of an error, if the raft node is - not initialized yet - - "}, - tlua::Function::new(|| -> traft::Result<&'static str> { - let node = traft::node::global()?; - Ok(node.governor_loop.status.get().governor_loop_status) - }), - ); - luamod_set( &l, "raft_tick", diff --git a/test/int/test_replication.py b/test/int/test_replication.py index 651e12db4757e26a51ab0fa98fed26a44c12d83d..3bd4baecc9aea4f68b1a75c5567bd43bb2b45816 100644 --- a/test/int/test_replication.py +++ b/test/int/test_replication.py @@ -195,7 +195,7 @@ def wait_governor_status(i: Instance, expected_status, timeout=5): pass def impl(): - actual_status = i.call("pico._governor_loop_status") + actual_status = i.call(".proc_runtime_info")["internal"]["governor_loop_status"] if actual_status == "not a leader": raise NotALeader("not a leader") diff --git a/test/int/test_snapshot.py b/test/int/test_snapshot.py index 20febb93f682423172cae083803e44e0d8cefc92..d04e3359e146a82547ca720f1247e09786c3cfcd 100644 --- a/test/int/test_snapshot.py +++ b/test/int/test_snapshot.py @@ -212,7 +212,8 @@ def test_large_snapshot(cluster: Cluster): # Wait for i4 to start receiving the snapshot Retriable(10, 60).call( lambda: assert_eq( - i4.eval("return pico.raft_status().main_loop_status"), "receiving snapshot" + i4.call(".proc_runtime_info")["internal"]["main_loop_status"], + "receiving snapshot", ) ) @@ -230,7 +231,8 @@ def test_large_snapshot(cluster: Cluster): # Wait for i5 to start receiving the snapshot Retriable(10, 60).call( lambda: assert_eq( - i5.eval("return pico.raft_status().main_loop_status"), "receiving snapshot" + i5.call(".proc_runtime_info")["internal"]["main_loop_status"], + "receiving snapshot", ) )