chore: fix flaky test for get section items (#1004)

This commit is contained in:
Khor Shu Heng 2024-11-18 09:42:57 +08:00 committed by GitHub
parent fd98351473
commit 51bd650644
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -1,7 +1,10 @@
use std::time::Duration;
use client_api::entity::{CreateCollabParams, QueryCollabParams};
use client_api_test::generate_unique_registered_user_client;
use collab::core::origin::CollabClient;
use collab_folder::{CollabOrigin, Folder};
use tokio::time::sleep;
#[tokio::test]
async fn get_workpace_folder() {
@ -83,6 +86,8 @@ async fn get_section_items() {
})
.await
.unwrap();
// Collab update is performed asynchronously via a queue
sleep(Duration::from_secs(1)).await;
let favorite_section_items = c.get_workspace_favorite(&workspace_id).await.unwrap();
assert_eq!(favorite_section_items.views.len(), 1);
assert_eq!(