Skip to content

Commit 148d01a

Browse files
authored
Adds retries for Spanner tests, fixes a few test errors (GoogleCloudPlatform#931)
1 parent 1954056 commit 148d01a

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

bigtable/src/create_dev_instance.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,7 @@
9494
);
9595
$operationResponse->pollUntilComplete();
9696
if (!$operationResponse->operationSucceeded()) {
97-
$error = $operationResponse->getError();
98-
throw $error;
97+
print('Error: ' . $operationResponse->getError());
9998
} else {
10099
printf("Instance %s created.", $instance_id);
101100
}

bigtable/src/create_production_instance.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@
8585
);
8686
$operationResponse->pollUntilComplete();
8787
if (!$operationResponse->operationSucceeded()) {
88-
$error = $operationResponse->getError();
89-
throw $error;
88+
print('Error: ' . $operationResponse->getError());
9089
} else {
9190
printf("Instance %s created.", $instance_id);
9291
}

spanner/test/spannerTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ public static function setUpBeforeClass()
6161
self::$instance = $spanner->instance(self::$instanceId);
6262
}
6363

64+
public function setUp()
65+
{
66+
$this->useExpectationFailedBackoff();
67+
}
68+
6469
public function testCreateDatabase()
6570
{
6671
$output = $this->runCommand('create-database');

0 commit comments

Comments
 (0)