reduce backend unit test loop time

This commit is contained in:
appflowy 2022-01-25 15:52:03 +08:00
parent d333f754c2
commit 49f1a96cda
2 changed files with 3 additions and 3 deletions

View File

@ -68,11 +68,11 @@ impl WebSocketReceiver for DocumentWebSocketReceiver {
match actor_msg_sender.send(msg).await {
Ok(_) => {}
Err(e) => log::error!("[DocumentWebSocketReceiver]: send message to actor failed: {}", e),
Err(e) => tracing::error!("[DocumentWebSocketReceiver]: send message to actor failed: {}", e),
}
match rx.await {
Ok(_) => {}
Err(e) => log::error!("[DocumentWebSocketReceiver]: message ret failed {:?}", e),
Err(e) => tracing::error!("[DocumentWebSocketReceiver]: message ret failed {:?}", e),
};
});
}

View File

@ -242,7 +242,7 @@ async fn doc_create() {
let user_id = "a".to_owned();
let mut document = ClientDocument::new::<PlainDoc>();
let mut offset = 0;
for i in 0..1000 {
for i in 0..5 {
let content = i.to_string();
let delta = document.insert(offset, content.clone()).unwrap();
offset += content.len();