()
| 1249 | |
| 1250 | #[tokio::test] |
| 1251 | async fn test_multiple_appends() { |
| 1252 | let file_io = test_file_io(); |
| 1253 | let table_path = "memory:/test_multiple_appends"; |
| 1254 | setup_dirs(&file_io, table_path).await; |
| 1255 | |
| 1256 | let commit = setup_commit(&file_io, table_path); |
| 1257 | |
| 1258 | // First commit |
| 1259 | commit |
| 1260 | .commit(vec![CommitMessage::new( |
| 1261 | vec![], |
| 1262 | 0, |
| 1263 | vec![test_data_file("data-0.parquet", 100)], |
| 1264 | )]) |
| 1265 | .await |
| 1266 | .unwrap(); |
| 1267 | |
| 1268 | // Second commit |
| 1269 | commit |
| 1270 | .commit(vec![CommitMessage::new( |
| 1271 | vec![], |
| 1272 | 0, |
| 1273 | vec![test_data_file("data-1.parquet", 200)], |
| 1274 | )]) |
| 1275 | .await |
| 1276 | .unwrap(); |
| 1277 | |
| 1278 | let snap_manager = SnapshotManager::new(file_io.clone(), table_path.to_string()); |
| 1279 | let snapshot = snap_manager.get_latest_snapshot().await.unwrap().unwrap(); |
| 1280 | assert_eq!(snapshot.id(), 2); |
| 1281 | assert_eq!(snapshot.total_record_count(), Some(300)); |
| 1282 | assert_eq!(snapshot.delta_record_count(), Some(200)); |
| 1283 | } |
| 1284 | |
| 1285 | #[tokio::test] |
| 1286 | async fn test_empty_commit_is_noop() { |
nothing calls this directly
no test coverage detected