diff --git a/tests/BucketManagerTest.php b/tests/BucketManagerTest.php index cd3b9114..3d7a4e06 100644 --- a/tests/BucketManagerTest.php +++ b/tests/BucketManagerTest.php @@ -135,7 +135,13 @@ public function testCreateBucketFlushEnable() $result = $this->manager->getBucket($this->bucketName); $this->assertTrue($result->flushEnabled()); - $this->manager->flush($this->bucketName); + $this->retryFor( + 5, + 100, + function () { + $this->manager->flush($this->bucketName); + } + ); } public function testCreateBucketFlushNotEnabled() @@ -277,19 +283,6 @@ function ($response) { } ); - $manager = $this->manager; - $bucketName = $this->bucketName; - $result = $this->retryFor( - 10, - 1000, - function () use ($manager, $bucketName) { - $result = $manager->getBucket($bucketName); - if ($result->maxExpiry() == 5) { - throw new RuntimeException("the bucket still has old maxExpiry, retrying"); - } - } - ); - $result = $this->manager->getBucket($this->bucketName); $this->assertEquals(10, $result->maxExpiry()); }