Skip to content

Commit

Permalink
fixup! Use randomized content ID for Azure multipart uploads
Browse files Browse the repository at this point in the history
  • Loading branch information
avarnon committed Dec 11, 2024
1 parent c2839a5 commit a4e8628
Showing 1 changed file with 44 additions and 10 deletions.
54 changes: 44 additions & 10 deletions object_store/src/azure/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -414,16 +414,50 @@ mod tests {
let mut multipart_upload_1 = integration.put_multipart(&path).await.unwrap();
let mut multipart_upload_2 = integration.put_multipart(&path).await.unwrap();

for i in 0..5 {
multipart_upload_1
.put_part(Bytes::from(format!("1:{},", i)).into())
.await
.unwrap();
multipart_upload_2
.put_part(Bytes::from(format!("2:{},", i)).into())
.await
.unwrap();
}
multipart_upload_1
.put_part(Bytes::from("1:0,").into())
.await
.unwrap();
multipart_upload_2
.put_part(Bytes::from("2:0,").into())
.await
.unwrap();

multipart_upload_2
.put_part(Bytes::from("2:1,").into())
.await
.unwrap();
multipart_upload_1
.put_part(Bytes::from("1:1,").into())
.await
.unwrap();

multipart_upload_1
.put_part(Bytes::from("1:2,").into())
.await
.unwrap();
multipart_upload_2
.put_part(Bytes::from("2:2,").into())
.await
.unwrap();

multipart_upload_2
.put_part(Bytes::from("2:3,").into())
.await
.unwrap();
multipart_upload_1
.put_part(Bytes::from("1:3,").into())
.await
.unwrap();

multipart_upload_1
.put_part(Bytes::from("1:4,").into())
.await
.unwrap();
multipart_upload_2
.put_part(Bytes::from("2:4,").into())
.await
.unwrap();

multipart_upload_1.complete().await.unwrap();
let err = multipart_upload_2.complete().await.unwrap_err();
Expand Down

0 comments on commit a4e8628

Please sign in to comment.