We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 226f1c3 commit b0ba492Copy full SHA for b0ba492
1 file changed
Spanner/tests/System/BackupTest.php
@@ -292,7 +292,19 @@ public function testCreateBackup2()
292
$backup = self::$instance->backup(self::$backupId2);
293
294
$op = $backup->create(self::$dbName2, $expireTime);
295
- $op->pollUntilComplete();
+ $timeout = time() + self::LONG_TIMEOUT_SECONDS;
296
+ while (time() < $timeout) {
297
+ try {
298
+ $op->pollUntilComplete([
299
+ 'maxPollingDurationSeconds' => $timeout - time()
300
+ ]);
301
+ break;
302
+ } catch (\Google\ApiCore\ApiException $e) {
303
+ if ($e->getStatus() !== 'DEADLINE_EXCEEDED') {
304
+ throw $e;
305
+ }
306
307
308
309
self::$deletionQueue->add(function () use ($backup) {
310
$backup->delete();
0 commit comments