chore: disable log in bloc test (#1336)

This commit is contained in:
Nathan.fooo 2022-10-22 20:58:33 +08:00 committed by GitHub
parent 80f034beee
commit 8dff9dc67c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 19 additions and 18 deletions

View File

@ -67,7 +67,7 @@ jobs:
- name: Build FlowySDK
working-directory: frontend
run: |
cargo make --profile test-linux test-lib-build
cargo make --profile test-linux build-test-lib
- name: Code Generation
working-directory: frontend/app_flowy

View File

@ -23,7 +23,7 @@ pub extern "C" fn init_sdk(path: *mut c_char) -> i64 {
let path: &str = c_str.to_str().unwrap();
let server_config = get_client_server_configuration().unwrap();
let config = FlowySDKConfig::new(path, "appflowy", server_config, false).log_filter("debug");
let config = FlowySDKConfig::new(path, "appflowy", server_config, false).log_filter("info");
FLOWY_SDK.get_or_init(|| FlowySDK::new(config));
0

View File

@ -273,7 +273,7 @@ impl DocumentEditorMap {
pub(crate) fn insert(&self, editor_id: &str, editor: Arc<dyn DocumentEditor>) {
if self.inner.contains_key(editor_id) {
log::warn!("Editor:{} already exists in cache", editor_id);
log::warn!("Editor:{} already open", editor_id);
}
self.inner.insert(editor_id.to_string(), editor);
}

View File

@ -34,7 +34,7 @@ pub(crate) async fn delete_app_handler(
Ok(())
}
#[tracing::instrument(level = "debug", skip(data, controller))]
#[tracing::instrument(level = "trace", skip(data, controller))]
pub(crate) async fn update_app_handler(
data: Data<UpdateAppPayloadPB>,
controller: AppData<Arc<AppController>>,
@ -44,7 +44,7 @@ pub(crate) async fn update_app_handler(
Ok(())
}
#[tracing::instrument(level = "info", skip(data, app_controller, view_controller), err)]
#[tracing::instrument(level = "trace", skip(data, app_controller, view_controller), err)]
pub(crate) async fn read_app_handler(
data: Data<AppIdPB>,
app_controller: AppData<Arc<AppController>>,

View File

@ -102,7 +102,7 @@ impl FolderMigration {
}
let _ = self.migration_folder_rev_struct(folder_id).await?;
KV::set_bool(&key, true);
tracing::info!("Run folder v3 migration");
tracing::trace!("Run folder v3 migration");
Ok(())
}

View File

@ -120,15 +120,16 @@ impl GridManager {
async fn get_or_create_grid_editor(&self, grid_id: &str) -> FlowyResult<Arc<GridRevisionEditor>> {
match self.grid_editors.get(grid_id) {
None => {
let db_pool = self.grid_user.db_pool()?;
let editor = self.make_grid_rev_editor(grid_id, db_pool).await?;
if self.grid_editors.contains_key(grid_id) {
tracing::warn!("Grid:{} already exists in cache", grid_id);
if let Some(editor) = self.grid_editors.get(grid_id) {
tracing::warn!("Grid:{} already open", grid_id);
Ok(editor.clone())
} else {
let db_pool = self.grid_user.db_pool()?;
let editor = self.make_grid_rev_editor(grid_id, db_pool).await?;
self.grid_editors.insert(grid_id.to_string(), editor.clone());
self.task_scheduler.write().await.register_handler(editor.clone());
Ok(editor)
}
self.grid_editors.insert(grid_id.to_string(), editor.clone());
self.task_scheduler.write().await.register_handler(editor.clone());
Ok(editor)
}
Some(editor) => Ok(editor.clone()),
}

View File

@ -164,19 +164,19 @@ script = [
]
script_runner = "@duckscript"
[tasks.test-lib-build]
[tasks.build-test-lib]
category = "Build"
dependencies = ["env_check"]
run_task = { name = ["setup-test-crate-type","test-sdk-build", "copy-to-sandbox-folder", "restore-test-crate-type"] }
run_task = { name = ["setup-test-crate-type","build-test-backend", "copy-to-sandbox-folder", "restore-test-crate-type"] }
[tasks.test-sdk-build]
[tasks.build-test-backend]
private = true
script = [
"""
cd rust-lib/
rustup show
echo cargo build --package=dart-ffi --target ${TEST_COMPILE_TARGET} --features "${FEATURES}"
cargo build --package=dart-ffi --target ${TEST_COMPILE_TARGET} --features "${FEATURES}"
RUST_LOG=${RUST_LOG} cargo build --package=dart-ffi --target ${TEST_COMPILE_TARGET} --features "${FEATURES}"
cd ../
""",
]