From f3cd3f2db978fa4fc61f25849ccc1d78860c68f9 Mon Sep 17 00:00:00 2001 From: "adrian.f.cole" Date: Tue, 3 Nov 2009 01:48:21 +0000 Subject: [PATCH] loosened testing git-svn-id: http://jclouds.googlecode.com/svn/trunk@2039 3d8758e0-26b5-11de-8745-db77d3ebf521 --- .../blobstore/functions/ReturnVoidOnNotFoundOr404.java | 6 ++++-- .../integration/internal/BaseBlobIntegrationTest.java | 3 +-- .../integration/internal/BaseBlobStoreIntegrationTest.java | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/blobstore/core/src/main/java/org/jclouds/blobstore/functions/ReturnVoidOnNotFoundOr404.java b/blobstore/core/src/main/java/org/jclouds/blobstore/functions/ReturnVoidOnNotFoundOr404.java index f2873a9b15..0b3e675a8d 100644 --- a/blobstore/core/src/main/java/org/jclouds/blobstore/functions/ReturnVoidOnNotFoundOr404.java +++ b/blobstore/core/src/main/java/org/jclouds/blobstore/functions/ReturnVoidOnNotFoundOr404.java @@ -23,6 +23,8 @@ */ package org.jclouds.blobstore.functions; +import static com.google.common.base.Preconditions.checkNotNull; + import java.lang.reflect.Constructor; import javax.inject.Inject; @@ -50,10 +52,10 @@ public class ReturnVoidOnNotFoundOr404 implements Function { } private final ReturnTrueOn404 rto404; - + @Inject private ReturnVoidOnNotFoundOr404(ReturnTrueOn404 rto404) { - this.rto404 = rto404; + this.rto404 = checkNotNull(rto404, "rto404"); } public Void apply(Exception from) { diff --git a/blobstore/core/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobIntegrationTest.java b/blobstore/core/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobIntegrationTest.java index a13965d11c..b333ec8a7d 100755 --- a/blobstore/core/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobIntegrationTest.java +++ b/blobstore/core/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobIntegrationTest.java @@ -400,9 +400,8 @@ public class BaseBlobIntegrationTest extends BaseBlobStoreIntegrationTest } } - protected void validateMetadata(BlobMetadata metadata) { - assertEquals(metadata.getContentType(), "text/plain"); + assert metadata.getContentType().startsWith("text/plain") : metadata.getContentType(); assertEquals(metadata.getSize(), new Long(TEST_STRING.length())); assertEquals(metadata.getUserMetadata().get("adrian"), "powderpuff"); assertEquals(metadata.getContentMD5(), HttpUtils.md5(TEST_STRING.getBytes())); diff --git a/blobstore/core/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobStoreIntegrationTest.java b/blobstore/core/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobStoreIntegrationTest.java index 36e2a449d2..249360f007 100644 --- a/blobstore/core/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobStoreIntegrationTest.java +++ b/blobstore/core/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobStoreIntegrationTest.java @@ -411,7 +411,7 @@ public class BaseBlobStoreIntegrationTest { throws InterruptedException, ExecutionException, TimeoutException { if (context.getBlobStore().exists(name)) { System.err.printf("*** deleting container %s...%n", name); - context.getBlobStore().deleteContainer(name).get(30, TimeUnit.SECONDS); + context.getBlobStore().deleteContainer(name).get(60, TimeUnit.SECONDS); assertConsistencyAware(context, new Runnable() { public void run() { try {