Create Payload per thread in testPutBlobParallel

Fixes a regression from 45bcc3ce22.
This commit is contained in:
Andrew Gaul 2016-06-23 05:26:21 -07:00
parent 45bcc3ce22
commit a845471b88
1 changed files with 3 additions and 3 deletions

View File

@ -119,8 +119,6 @@ public class BaseBlobIntegrationTest extends BaseBlobStoreIntegrationTest {
@Test(groups = { "integration", "live" })
public void testPutBlobParallel() throws Exception {
final ByteSource expected = createTestInput(32 * 1024);
final Payload testPayload = Payloads.newByteSourcePayload(expected);
testPayload.getContentMetadata().setContentType("image/png");
final String container = getContainerName();
try {
@ -131,7 +129,9 @@ public class BaseBlobIntegrationTest extends BaseBlobStoreIntegrationTest {
@Override
public Void call() throws Exception {
Blob blob = view.getBlobStore().blobBuilder(name).payload(testPayload).contentLength(expected.size()).build();
Payload payload = Payloads.newByteSourcePayload(expected);
payload.getContentMetadata().setContentType("image/png");
Blob blob = view.getBlobStore().blobBuilder(name).payload(payload).contentLength(expected.size()).build();
view.getBlobStore().putBlob(container, blob);
assertConsistencyAwareBlobExists(container, name);