mirror of https://github.com/apache/jclouds.git
fixed integration test that downloads remote files
git-svn-id: http://jclouds.googlecode.com/svn/trunk@1846 3d8758e0-26b5-11de-8745-db77d3ebf521
This commit is contained in:
parent
780b347a59
commit
6dc3d789c1
|
@ -46,17 +46,17 @@ import org.testng.annotations.Test;
|
||||||
public class S3ConnectionLiveTest extends S3IntegrationTest {
|
public class S3ConnectionLiveTest extends S3IntegrationTest {
|
||||||
|
|
||||||
private static final String sysHttpStreamUrl = System.getProperty("jclouds.s3.httpstream.url");
|
private static final String sysHttpStreamUrl = System.getProperty("jclouds.s3.httpstream.url");
|
||||||
private static final String sysHttpStreamETag = System.getProperty("jclouds.s3.httpstream.eTag");
|
private static final String sysHttpStreamETag = System.getProperty("jclouds.s3.httpstream.md5");
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Parameters( { "jclouds.s3.httpstream.url", "jclouds.s3.httpstream.eTag" })
|
@Parameters( { "jclouds.s3.httpstream.url", "jclouds.s3.httpstream.md5" })
|
||||||
public void testCopyUrl(@Optional String httpStreamUrl, @Optional String httpStreamETag)
|
public void testCopyUrl(@Optional String httpStreamUrl, @Optional String httpStreamETag)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
httpStreamUrl = checkNotNull(httpStreamUrl != null ? httpStreamUrl : sysHttpStreamUrl,
|
httpStreamUrl = checkNotNull(httpStreamUrl != null ? httpStreamUrl : sysHttpStreamUrl,
|
||||||
"httpStreamUrl");
|
"httpStreamUrl");
|
||||||
|
|
||||||
httpStreamETag = checkNotNull(httpStreamETag != null ? httpStreamETag : sysHttpStreamETag,
|
httpStreamETag = checkNotNull(httpStreamETag != null ? httpStreamETag : sysHttpStreamETag,
|
||||||
"httpStreamETag");
|
"httpStreamMd5");
|
||||||
|
|
||||||
String key = "hello";
|
String key = "hello";
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ public class S3ConnectionLiveTest extends S3IntegrationTest {
|
||||||
object.getMetadata().setSize(length);
|
object.getMetadata().setSize(length);
|
||||||
String bucketName = getBucketName();
|
String bucketName = getBucketName();
|
||||||
try {
|
try {
|
||||||
byte[] newETag = client.putObject(bucketName, object).get(30, TimeUnit.SECONDS);
|
byte[] newETag = client.putObject(bucketName, object).get(180, TimeUnit.SECONDS);
|
||||||
assertEquals(newETag, eTag);
|
assertEquals(newETag, eTag);
|
||||||
} finally {
|
} finally {
|
||||||
returnBucket(bucketName);
|
returnBucket(bucketName);
|
||||||
|
|
Loading…
Reference in New Issue