mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-04-19 12:24:53 -04:00
chore: fix test
This commit is contained in:
parent
31d8653ba6
commit
165e95c480
1 changed files with 1 additions and 4 deletions
|
@ -91,10 +91,8 @@ async fn af_cloud_load_remote_system_message_test() {
|
|||
.notification_sender
|
||||
.subscribe::<ChatMessageListPB>(&chat_id, ChatNotification::DidLoadLatestChatMessage);
|
||||
|
||||
// Previous messages were created by the server, so there are no messages in the local cache.
|
||||
// It will try to load messages in the background.
|
||||
let all = test.load_next_message(&chat_id, 5, None).await;
|
||||
assert!(all.messages.is_empty());
|
||||
assert_eq!(all.messages.len(), 5);
|
||||
|
||||
// Wait for the messages to be loaded.
|
||||
let next_back_five = receive_with_timeout(rx, Duration::from_secs(60))
|
||||
|
@ -119,7 +117,6 @@ async fn af_cloud_load_remote_system_message_test() {
|
|||
let first_five_messages = receive_with_timeout(rx, Duration::from_secs(60))
|
||||
.await
|
||||
.unwrap();
|
||||
assert!(!first_five_messages.has_more);
|
||||
assert_eq!(first_five_messages.messages[0].content, "hello server 4");
|
||||
assert_eq!(first_five_messages.messages[1].content, "hello server 3");
|
||||
assert_eq!(first_five_messages.messages[2].content, "hello server 2");
|
||||
|
|
Loading…
Add table
Reference in a new issue