Skip to content

Commit f868e1b

Browse files
committed
revert sleep time, add more debug to the failed test
1 parent 989f5ed commit f868e1b

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

tests/sample/Compute/v2/VolumeAttachmentTest.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function testDetach(VolumeAttachment $createdVolumeAttachment)
7070
// let's wait for the server to be completely up
7171
// https://bugs.launchpad.net/nova/+bug/1998148
7272
// https://bugs.launchpad.net/nova/+bug/1960346
73-
sleep(30);
73+
sleep(15);
7474

7575
require_once $this->sampleFile(
7676
'volume_attachments/delete.php',
@@ -85,8 +85,16 @@ public function testDetach(VolumeAttachment $createdVolumeAttachment)
8585
$this->assertEquals('available', $volume->status);
8686

8787
$server = $this->getService()->getServer(['id' => $createdVolumeAttachment->serverId]);
88+
$server->retrieve();
8889
foreach ($server->listVolumeAttachments() as $volumeAttachment) {
89-
$this->assertNotEquals($createdVolumeAttachment->id, $volumeAttachment->id);
90+
if ($volumeAttachment->volumeId === $createdVolumeAttachment->volumeId) {
91+
print_r($volumeAttachment);
92+
print_r($server);
93+
94+
$this->fail('Volume attachment was not detached');
95+
} else {
96+
$this->assertNotEquals($createdVolumeAttachment->id, $volumeAttachment->id);
97+
}
9098
}
9199

92100
$volume->delete();

0 commit comments

Comments
 (0)