diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/MediaClientLiveTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/MediaClientLiveTest.java index 5c9a2c24ca..05ae9aa618 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/MediaClientLiveTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/MediaClientLiveTest.java @@ -143,9 +143,10 @@ public class MediaClientLiveTest extends BaseVCloudDirectorClientLiveTest { media = mediaClient.getMedia(media.getHref()); - Task task = Iterables.getOnlyElement(media.getTasks()); - - assertEquals(task.getStatus(), "running"); + if (media.getTasks().size() == 1) { + Task task = Iterables.getOnlyElement(media.getTasks()); + assertEquals(task.getStatus(), "running"); + } File file = Iterables.getOnlyElement(media.getFiles()); assertEquals(file.getSize(), new Long(iso.length));