mirror of https://github.com/apache/jclouds.git
guard against task already finished in createMedia test
This commit is contained in:
parent
ee2a7e96ba
commit
13cf27cd0f
|
@ -143,9 +143,10 @@ public class MediaClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
|
|
||||||
media = mediaClient.getMedia(media.getHref());
|
media = mediaClient.getMedia(media.getHref());
|
||||||
|
|
||||||
|
if (media.getTasks().size() == 1) {
|
||||||
Task task = Iterables.getOnlyElement(media.getTasks());
|
Task task = Iterables.getOnlyElement(media.getTasks());
|
||||||
|
|
||||||
assertEquals(task.getStatus(), "running");
|
assertEquals(task.getStatus(), "running");
|
||||||
|
}
|
||||||
|
|
||||||
File file = Iterables.getOnlyElement(media.getFiles());
|
File file = Iterables.getOnlyElement(media.getFiles());
|
||||||
assertEquals(file.getSize(), new Long(iso.length));
|
assertEquals(file.getSize(), new Long(iso.length));
|
||||||
|
|
Loading…
Reference in New Issue