From ebbf3a7bc34444d7ba4d0e4fd17f44a8801eef3d Mon Sep 17 00:00:00 2001 From: overtrue Date: Sun, 25 May 2025 18:47:25 +0800 Subject: [PATCH] fix: correct test_read_xl_meta_no_data test data format --- ecstore/src/file_meta.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ecstore/src/file_meta.rs b/ecstore/src/file_meta.rs index 6bb644bab..c0c167f6f 100644 --- a/ecstore/src/file_meta.rs +++ b/ecstore/src/file_meta.rs @@ -2290,14 +2290,12 @@ async fn test_read_xl_meta_no_data() { fm.add_version(fi).unwrap(); } - let mut buff = fm.marshal_msg().unwrap(); - - buff.resize(buff.len() + 100, 0); + // Use marshal_msg to create properly formatted data with XL headers + let buff = fm.marshal_msg().unwrap(); let filepath = "./test_xl.meta"; let mut file = File::create(filepath).await.unwrap(); - // 写入字符串 file.write_all(&buff).await.unwrap(); let mut f = File::open(filepath).await.unwrap();