You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by ga...@apache.org on 2013/07/16 17:27:48 UTC
git commit: Expect exception from FilePayload.getInput
Updated Branches:
refs/heads/master ac58a70e3 -> fcdc3d613
Expect exception from FilePayload.getInput
Previously the constructor threw this. Fixes regression from ac58a70.
Project: http://git-wip-us.apache.org/repos/asf/incubator-jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-jclouds/commit/fcdc3d61
Tree: http://git-wip-us.apache.org/repos/asf/incubator-jclouds/tree/fcdc3d61
Diff: http://git-wip-us.apache.org/repos/asf/incubator-jclouds/diff/fcdc3d61
Branch: refs/heads/master
Commit: fcdc3d6138145fadb28956d1d0b6270e4f7fc5a0
Parents: ac58a70
Author: Andrew Gaul <ga...@apache.org>
Authored: Tue Jul 16 08:26:08 2013 -0700
Committer: Andrew Gaul <ga...@apache.org>
Committed: Tue Jul 16 08:26:50 2013 -0700
----------------------------------------------------------------------
.../strategy/internal/FilesystemStorageStrategyImplTest.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/fcdc3d61/apis/filesystem/src/test/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImplTest.java
----------------------------------------------------------------------
diff --git a/apis/filesystem/src/test/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImplTest.java b/apis/filesystem/src/test/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImplTest.java
index 4b2490e..0f567ae 100644
--- a/apis/filesystem/src/test/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImplTest.java
+++ b/apis/filesystem/src/test/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImplTest.java
@@ -40,6 +40,7 @@ import org.jclouds.filesystem.predicates.validators.internal.FilesystemContainer
import org.jclouds.filesystem.utils.TestUtils;
import org.jclouds.io.payloads.FilePayload;
import org.jclouds.io.payloads.InputStreamPayload;
+import org.jclouds.util.Throwables2;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
@@ -384,10 +385,12 @@ public class FilesystemStorageStrategyImplTest {
public void testWritePayloadOnFile_SourceFileDoesntExist() {
File sourceFile = new File("asdfkjsadkfjasdlfasdflk.asdfasdfas");
+ FilePayload payload = new FilePayload(sourceFile);
try {
- new FilePayload(sourceFile);
- fail("Exception not throwed");
+ payload.getInput();
+ fail("Exception not thrown");
} catch (Exception ex) {
+ assertNotNull(Throwables2.getFirstThrowableOfType(ex, IOException.class));
}
}