diff --git a/tests/sample/Compute/v2/VolumeAttachmentTest.php b/tests/sample/Compute/v2/VolumeAttachmentTest.php index 47958a6e..62512c94 100644 --- a/tests/sample/Compute/v2/VolumeAttachmentTest.php +++ b/tests/sample/Compute/v2/VolumeAttachmentTest.php @@ -70,7 +70,7 @@ public function testDetach(VolumeAttachment $createdVolumeAttachment) // let's wait for the server to be completely up // https://bugs.launchpad.net/nova/+bug/1998148 // https://bugs.launchpad.net/nova/+bug/1960346 - sleep(30); + sleep(15); require_once $this->sampleFile( 'volume_attachments/delete.php', @@ -84,9 +84,20 @@ public function testDetach(VolumeAttachment $createdVolumeAttachment) $volume->waitUntil('available', 240); $this->assertEquals('available', $volume->status); + sleep(5); + $server = $this->getService()->getServer(['id' => $createdVolumeAttachment->serverId]); + $server->retrieve(); foreach ($server->listVolumeAttachments() as $volumeAttachment) { - $this->assertNotEquals($createdVolumeAttachment->id, $volumeAttachment->id); + if ($volumeAttachment->volumeId === $createdVolumeAttachment->volumeId) { + print_r($volume); + print_r($volumeAttachment); + print_r($server); + + $this->fail('Volume attachment was not detached'); + } else { + $this->assertNotEquals($createdVolumeAttachment->id, $volumeAttachment->id); + } } $volume->delete();