chore: fix test
This commit is contained in:
parent
1a5c1714db
commit
fddbc8073e
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -239,7 +239,7 @@ async fn init_collab_handle(
|
|||
) -> Result<OpenCollabHandle, HistoryError> {
|
||||
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();
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
//
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue