Skip to content

Commit a217ef3

Browse files
authored
Merge branch 'master' into PHP-8.4
2 parents e445057 + d305fb6 commit a217ef3

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

tests/sample/Compute/v2/VolumeAttachmentTest.php

+12-1
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,20 @@ public function testDetach(VolumeAttachment $createdVolumeAttachment)
8484
$volume->waitUntil('available', 240);
8585
$this->assertEquals('available', $volume->status);
8686

87+
sleep(5);
88+
8789
$server = $this->getService()->getServer(['id' => $createdVolumeAttachment->serverId]);
90+
$server->retrieve();
8891
foreach ($server->listVolumeAttachments() as $volumeAttachment) {
89-
$this->assertNotEquals($createdVolumeAttachment->id, $volumeAttachment->id);
92+
if ($volumeAttachment->volumeId === $createdVolumeAttachment->volumeId) {
93+
print_r($volume);
94+
print_r($volumeAttachment);
95+
print_r($server);
96+
97+
$this->fail('Volume attachment was not detached');
98+
} else {
99+
$this->assertNotEquals($createdVolumeAttachment->id, $volumeAttachment->id);
100+
}
90101
}
91102

92103
$volume->delete();

0 commit comments

Comments
 (0)