diff --git a/app/gui/src/controller/upload.rs b/app/gui/src/controller/upload.rs index 9f52e4402064..45878455cf3d 100644 --- a/app/gui/src/controller/upload.rs +++ b/app/gui/src/controller/upload.rs @@ -77,6 +77,8 @@ pub struct FileToUpload { #[derive(Clone, Debug)] pub struct FileUploadProcess { bin_connection: Rc, + // See FIXME in upload_chunk method. + #[allow(dead_code)] json_connection: Rc, file: FileToUpload, remote_path: Path, @@ -142,13 +144,17 @@ impl FileUploadProcess { ); self.bytes_uploaded = self.file.size; } - self.check_checksum().await?; + //TODO[ao]: The language server checksum method sometimes fails: + // https://github.com/enso-org/enso/issues/6691 so we skip the check until fixed. + // self.check_checksum().await?; Ok(UploadingState::Finished) } Err(err) => Err(err), } } + // See FIXME in upload_chunk method. + #[allow(dead_code)] async fn check_checksum(&mut self) -> FallibleResult { let remote = self.json_connection.file_checksum(&self.remote_path).await?.checksum; let local = Into::::into(std::mem::take(&mut self.checksum)); @@ -432,7 +438,7 @@ mod test { fn setup_uploading_expectations( &self, - json_client: &language_server::MockClient, + _json_client: &language_server::MockClient, binary_client: &mut binary::MockClient, ) { let mut write_seq = Sequence::new(); @@ -450,12 +456,13 @@ mod test { .returning(move |_, _, _, _| future::ready(Ok(checksum.clone())).boxed_local()); offset += chunk_len as u64; } - let checksum = self.checksum.clone(); - let path = self.path.clone(); - json_client.expect.file_checksum(move |p| { - assert_eq!(*p, path); - Ok(response::FileChecksum { checksum }) - }); + // See FIXME in upload_chunk method. + // let checksum = self.checksum.clone(); + // let path = self.path.clone(); + // json_client.expect.file_checksum(move |p| { + // assert_eq!(*p, path); + // Ok(response::FileChecksum { checksum }) + // }); } fn file_to_upload(&self) -> FileToUpload { @@ -535,6 +542,7 @@ mod test { } #[test] + #[ignore] // See FIXME in upload_chunk method. fn checksum_mismatch_should_cause_an_error() { let mut data = TestData::new(vec![vec![1, 2, 3, 4, 5]]); data.checksum = Sha3_224::new(&[3, 4, 5, 6, 7, 8]); @@ -573,7 +581,7 @@ mod test { assert_eq!(fixture.module.ast().repr(), module_code_uploaded(TEST_FILE)); } - #[wasm_bindgen_test] + #[test] fn recreating_data_directory() { let mut fixture = mock::Unified::new().fixture_customize(|_, json_rpc, _| { json_rpc.expect.file_info(|path| { @@ -595,7 +603,7 @@ mod test { fixture.executor.expect_completion(handler.ensure_data_directory_exists()).unwrap(); } - #[wasm_bindgen_test] + #[test] fn name_collisions_are_avoided() { struct Case { file_name: String,