chore: replace uuid with nanoid

This commit is contained in:
appflowy
2022-04-11 15:27:03 +08:00
parent f438898831
commit 82840e1201
33 changed files with 133 additions and 120 deletions

View File

@ -5,7 +5,7 @@ use crate::helper::*;
use flowy_net::{get_client_server_configuration, ClientServerConfiguration};
use flowy_sdk::{FlowySDK, FlowySDKConfig};
use flowy_user::entities::UserProfile;
use lib_infra::uuid;
use nanoid::nanoid;
pub mod prelude {
pub use crate::{event_builder::*, helper::*, *};
@ -36,7 +36,7 @@ impl std::default::Default for FlowySDKTest {
impl FlowySDKTest {
pub fn new(server_config: ClientServerConfiguration) -> Self {
let config = FlowySDKConfig::new(&root_dir(), server_config, &uuid()).log_filter("trace");
let config = FlowySDKConfig::new(&root_dir(), server_config, &nanoid!(6)).log_filter("trace");
let sdk = std::thread::spawn(|| FlowySDK::new(config)).join().unwrap();
std::mem::forget(sdk.dispatcher());
Self { inner: sdk }