diff --git a/libs/collab-stream/tests/collab_stream_test/stream_group_test.rs b/libs/collab-stream/tests/collab_stream_test/stream_group_test.rs index 18030ee0..b6404cbe 100644 --- a/libs/collab-stream/tests/collab_stream_test/stream_group_test.rs +++ b/libs/collab-stream/tests/collab_stream_test/stream_group_test.rs @@ -114,14 +114,23 @@ async fn different_group_read_undelivered_message_test() { async fn different_group_read_message_test() { let oid = format!("o{}", random_i64()); let client = stream_client().await; - let mut group_1 = client.collab_update_stream("w1", &oid, "g1").await.unwrap(); - let mut group_2 = client.collab_update_stream("w1", &oid, "g2").await.unwrap(); + let mut group_1 = client + .collab_update_stream_group("w1", &oid, "g1") + .await + .unwrap(); + let mut group_2 = client + .collab_update_stream_group("w1", &oid, "g2") + .await + .unwrap(); let msg = StreamBinary(vec![1, 2, 3, 4, 5]); { let client = stream_client().await; - let mut group = client.collab_update_stream("w1", &oid, "g2").await.unwrap(); + let mut group = client + .collab_update_stream_group("w1", &oid, "g2") + .await + .unwrap(); group.insert_binary(msg).await.unwrap(); } let msg = group_1 diff --git a/services/appflowy-history_deprecated/src/core/manager.rs b/services/appflowy-history_deprecated/src/core/manager.rs index dc44bdc6..4ea7b31d 100644 --- a/services/appflowy-history_deprecated/src/core/manager.rs +++ b/services/appflowy-history_deprecated/src/core/manager.rs @@ -239,7 +239,7 @@ async fn init_collab_handle( ) -> Result { let group_name = format!("history_{}:{}", workspace_id, object_id); let update_stream = redis_stream - .collab_update_stream(workspace_id, object_id, &group_name) + .collab_update_stream_group(workspace_id, object_id, &group_name) .await .unwrap(); diff --git a/services/appflowy-history_deprecated/tests/edit_test/recv_update_test.rs b/services/appflowy-history_deprecated/tests/edit_test/recv_update_test.rs index df89f156..cda1396b 100644 --- a/services/appflowy-history_deprecated/tests/edit_test/recv_update_test.rs +++ b/services/appflowy-history_deprecated/tests/edit_test/recv_update_test.rs @@ -27,7 +27,7 @@ async fn apply_update_stream_updates_test() { .unwrap(); let mut update_group = redis_stream - .collab_update_stream(&workspace_id, &object_id, "appflowy_cloud") + .collab_update_stream_group(&workspace_id, &object_id, "appflowy_cloud") .await .unwrap(); @@ -81,7 +81,7 @@ async fn apply_update_stream_updates_test() { // .unwrap(); // // let mut update_group = redis_stream -// .collab_update_stream(&workspace_id, &object_id, "appflowy_cloud") +// .collab_update_stream_group(&workspace_id, &object_id, "appflowy_cloud") // .await // .unwrap(); // diff --git a/services/appflowy-history_deprecated/tests/stream_test/update_stream_test.rs b/services/appflowy-history_deprecated/tests/stream_test/update_stream_test.rs index 4b2b6e16..ab1ac86a 100644 --- a/services/appflowy-history_deprecated/tests/stream_test/update_stream_test.rs +++ b/services/appflowy-history_deprecated/tests/stream_test/update_stream_test.rs @@ -10,7 +10,7 @@ async fn single_reader_single_sender_update_stream_test() { let object_id = uuid::Uuid::new_v4().to_string(); let mut send_group = redis_stream - .collab_update_stream(&workspace, &object_id, "write") + .collab_update_stream_group(&workspace, &object_id, "write") .await .unwrap(); for i in 0..5 { @@ -18,7 +18,7 @@ async fn single_reader_single_sender_update_stream_test() { } let mut recv_group = redis_stream - .collab_update_stream(&workspace, &object_id, "read1") + .collab_update_stream_group(&workspace, &object_id, "read1") .await .unwrap(); @@ -55,19 +55,19 @@ async fn multiple_reader_single_sender_update_stream_test() { let object_id = uuid::Uuid::new_v4().to_string(); let mut send_group = redis_stream - .collab_update_stream(&workspace, &object_id, "write") + .collab_update_stream_group(&workspace, &object_id, "write") .await .unwrap(); send_group.insert_message(vec![1, 2, 3]).await.unwrap(); send_group.insert_message(vec![4, 5, 6]).await.unwrap(); let recv_group_1 = redis_stream - .collab_update_stream(&workspace, &object_id, "read1") + .collab_update_stream_group(&workspace, &object_id, "read1") .await .unwrap(); let recv_group_2 = redis_stream - .collab_update_stream(&workspace, &object_id, "read2") + .collab_update_stream_group(&workspace, &object_id, "read2") .await .unwrap(); // Both groups should have the same messages