File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -324,7 +324,19 @@ public function testCreateBackupCopy()
324324 $ this ->assertArrayHasKey ('progressPercent ' , $ metadata ['progress ' ]);
325325 $ this ->assertArrayHasKey ('startTime ' , $ metadata ['progress ' ]);
326326
327- $ op ->pollUntilComplete ();
327+ $ timeout = time () + self ::LONG_TIMEOUT_SECONDS ;
328+ while (time () < $ timeout ) {
329+ try {
330+ $ op ->pollUntilComplete ([
331+ 'maxPollingDurationSeconds ' => $ timeout - time ()
332+ ]);
333+ break ;
334+ } catch (\Google \ApiCore \ApiException $ e ) {
335+ if ($ e ->getStatus () !== 'DEADLINE_EXCEEDED ' ) {
336+ throw $ e ;
337+ }
338+ }
339+ }
328340
329341 self ::$ deletionQueue ->add (function () use ($ newBackup ) {
330342 $ newBackup ->delete ();
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ class PgQueryTest extends SystemTestCase
4141{
4242 use PgSystemTestCaseTrait;
4343
44- const TABLE_NAME = 'PgQueryTest ' ;
44+ const TABLE_NAME = 'PgQueryTest_2 ' ;
4545
4646 public static $ timestampVal ;
4747
Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ protected static function setUpTestDatabase(): void
126126 boolField BOOL,
127127 PRIMARY KEY (id)
128128 ) ' ,
129- 'CREATE TABLE IF NOT EXISTS PgQueryTest (
129+ 'CREATE TABLE IF NOT EXISTS PgQueryTest_2 (
130130 id bigint NOT NULL,
131131 name varchar(1024),
132132 registered bool,
Original file line number Diff line number Diff line change 1+ export GOOGLE_CLOUD_PROJECT=" php-docs-samples-kokoro"
2+ export GOOGLE_CLOUD_QUOTA_PROJECT=" php-docs-samples-kokoro"
3+ export GOOGLE_CLOUD_PHP_WHITELIST_TESTS_KEY_PATH=" /Users/yejiyun/Downloads/php-docs-samples-kokoro-28f7d635913c.json"
4+ export GOOGLE_CLOUD_PHP_TESTS_KEY_PATH=" /Users/yejiyun/Downloads/php-docs-samples-kokoro-28f7d635913c.json"
5+ export GOOGLE_CLOUD_SPANNER_TEST_DATABASE=" php-test-std-v2"
6+ export GOOGLE_CLOUD_SPANNER_TEST_PG_DATABASE=" php-test-pg-v2"
7+ export GOOGLE_CLOUD_SPANNER_TEST_BACKUP_DATABASE_1=" php-test-bkp-1"
8+ export GOOGLE_CLOUD_SPANNER_TEST_BACKUP_DATABASE_2=" php-test-bkp-2"
You can’t perform that action at this time.
0 commit comments