Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stalkopat committed Oct 4, 2024
1 parent 745fc85 commit 258c2f1
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion ractor_cluster/src/node/node_session/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,7 @@ async fn node_session_handle_control() {
.await
.expect("Failed to process control message");
assert_eq!(1, state.remote_actors.len());
let id_set = ractor::pg::get_members(&group_name.to_string())
let id_set = ractor::pg::get_scoped_members(&scope_name.to_string(), &group_name.to_string())
.into_iter()
.map(|a| a.get_id())
.collect::<HashSet<_>>();
Expand All @@ -793,6 +793,15 @@ async fn node_session_handle_control() {
pid: 43
}));

let id_set = ractor::pg::get_members(&group_name.to_string())
.into_iter()
.map(|a| a.get_id())
.collect::<HashSet<_>>();
assert!(!id_set.contains(&ActorId::Remote {
node_id: 1,
pid: 43
}));

// check pg leave leaves the pg group
session
.handle_control(
Expand All @@ -814,6 +823,14 @@ async fn node_session_handle_control() {
.await
.expect("Failed to process control message");
assert_eq!(1, state.remote_actors.len());
let id_set = ractor::pg::get_scoped_members(&scope_name.to_string(), &group_name.to_string())
.into_iter()
.map(|a| a.get_id())
.collect::<HashSet<_>>();
assert!(!id_set.contains(&ActorId::Remote {
node_id: 1,
pid: 43
}));
let id_set = ractor::pg::get_members(&group_name.to_string())
.into_iter()
.map(|a| a.get_id())
Expand Down

0 comments on commit 258c2f1

Please sign in to comment.