From a52866f28e5fdece1158ce4ff88ea254c039605e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=B8=A3=E9=95=9D?= Date: Sat, 12 Nov 2016 10:12:59 +0800 Subject: [PATCH] update sleep --- tests/OSS/Tests/BucketLiveChannelTest.php | 1 - tests/OSS/Tests/Common.php | 2 +- tests/OSS/Tests/OssClientImageTest.php | 1 - tests/OSS/Tests/TestOssClientBase.php | 2 +- 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/OSS/Tests/BucketLiveChannelTest.php b/tests/OSS/Tests/BucketLiveChannelTest.php index c7c791d4..d701f738 100644 --- a/tests/OSS/Tests/BucketLiveChannelTest.php +++ b/tests/OSS/Tests/BucketLiveChannelTest.php @@ -21,7 +21,6 @@ public function setUp() $this->bucketName = 'php-sdk-test-rtmp-bucket-name-' . strval(rand(0, 10000)); $this->client->createBucket($this->bucketName); Common::waitMetaSync(); - sleep(15); } public function tearDown() diff --git a/tests/OSS/Tests/Common.php b/tests/OSS/Tests/Common.php index c0c64455..9d7190cc 100644 --- a/tests/OSS/Tests/Common.php +++ b/tests/OSS/Tests/Common.php @@ -64,7 +64,7 @@ public static function createBucket() public static function waitMetaSync() { if (getenv('TRAVIS')) { - sleep(50); + sleep(10); } } } diff --git a/tests/OSS/Tests/OssClientImageTest.php b/tests/OSS/Tests/OssClientImageTest.php index a5d5d227..386102a1 100644 --- a/tests/OSS/Tests/OssClientImageTest.php +++ b/tests/OSS/Tests/OssClientImageTest.php @@ -26,7 +26,6 @@ public function setUp() $this->bucketName = 'php-sdk-test-bucket-image-' . strval(rand(0, 10000)); $this->client->createBucket($this->bucketName); Common::waitMetaSync(); - sleep(15); $this->local_file = "example.jpg"; $this->object = "oss-example.jpg"; $this->download_file = "image.jpg"; diff --git a/tests/OSS/Tests/TestOssClientBase.php b/tests/OSS/Tests/TestOssClientBase.php index f1a5ea4f..4abd31f9 100644 --- a/tests/OSS/Tests/TestOssClientBase.php +++ b/tests/OSS/Tests/TestOssClientBase.php @@ -23,11 +23,11 @@ public function setUp() $this->bucket = Common::getBucketName() . rand(100000, 999999); $this->ossClient = Common::getOssClient(); $this->ossClient->createBucket($this->bucket); + Common::waitMetaSync(); } public function tearDown() { - sleep(30); if (!$this->ossClient->doesBucketExist($this->bucket)) { return; }