diff --git a/src/engine/strat_engine/thinpool/thinpool.rs b/src/engine/strat_engine/thinpool/thinpool.rs index de67bb0755..7ce651d8b5 100644 --- a/src/engine/strat_engine/thinpool/thinpool.rs +++ b/src/engine/strat_engine/thinpool/thinpool.rs @@ -2590,14 +2590,14 @@ mod tests { pool_name, pool_uuid, "stratis_test_filesystem", - Sectors::from(1200 * IEC::Ki), - // 700 * IEC::Mi - Some(Sectors(1400 * IEC::Ki)), + Sectors::from(2400 * IEC::Ki), + // 1400 * IEC::Mi + Some(Sectors(2800 * IEC::Ki)), ) .unwrap(); let devnode = { let (_, fs) = pool.get_mut_filesystem_by_uuid(fs_uuid).unwrap(); - assert_eq!(fs.size_limit(), Some(Sectors(1400 * IEC::Ki))); + assert_eq!(fs.size_limit(), Some(Sectors(2800 * IEC::Ki))); fs.devnode() }; @@ -2621,8 +2621,8 @@ mod tests { .open(new_file) .unwrap(); let mut bytes_written = Bytes(0); - // Write 400 * IEC::Mi - while bytes_written < Bytes::from(400 * IEC::Mi) { + // Write 800 * IEC::Mi + while bytes_written < Bytes::from(800 * IEC::Mi) { file.write_all(&[1; 4096]).unwrap(); bytes_written += Bytes(4096); } @@ -2634,16 +2634,16 @@ mod tests { assert_eq!(fs.size_limit(), Some(fs.size().sectors())); } - // 800 * IEC::Mi - pool.set_fs_size_limit(fs_uuid, Some(Sectors(1600 * IEC::Ki))) + // 1600 * IEC::Mi + pool.set_fs_size_limit(fs_uuid, Some(Sectors(3200 * IEC::Ki))) .unwrap(); { let (_, fs) = pool.get_mut_filesystem_by_uuid(fs_uuid).unwrap(); - assert_eq!(fs.size_limit(), Some(Sectors(1600 * IEC::Ki))); + assert_eq!(fs.size_limit(), Some(Sectors(3200 * IEC::Ki))); } let mut bytes_written = Bytes(0); - // Write 100 * IEC::Mi - while bytes_written < Bytes::from(100 * IEC::Mi) { + // Write 200 * IEC::Mi + while bytes_written < Bytes::from(200 * IEC::Mi) { file.write_all(&[1; 4096]).unwrap(); bytes_written += Bytes(4096); } @@ -2659,7 +2659,7 @@ mod tests { let (_, fs) = pool .snapshot_filesystem(pool_name, pool_uuid, fs_uuid, "snapshot") .unwrap(); - assert_eq!(fs.size_limit(), Some(Sectors(1600 * IEC::Ki))); + assert_eq!(fs.size_limit(), Some(Sectors(3200 * IEC::Ki))); } pool.set_fs_size_limit(fs_uuid, None).unwrap(); @@ -2668,8 +2668,8 @@ mod tests { assert_eq!(fs.size_limit(), None); } let mut bytes_written = Bytes(0); - // Write 200 * IEC::Mi - while bytes_written < Bytes::from(200 * IEC::Mi) { + // Write 400 * IEC::Mi + while bytes_written < Bytes::from(400 * IEC::Mi) { file.write_all(&[1; 4096]).unwrap(); bytes_written += Bytes(4096); } @@ -2678,7 +2678,7 @@ mod tests { { let (_, fs) = pool.get_mut_filesystem_by_uuid(fs_uuid).unwrap(); - assert_eq!(fs.size().sectors(), Sectors(3200 * IEC::Ki)); + assert_eq!(fs.size().sectors(), Sectors(6400 * IEC::Ki)); } assert!(pool.set_fs_size_limit(fs_uuid, Some(Sectors(50))).is_err());