diff --git a/spanner/src/read_stale_data.php b/spanner/src/read_stale_data.php index 52581ffca0..c9b09da1f5 100644 --- a/spanner/src/read_stale_data.php +++ b/spanner/src/read_stale_data.php @@ -48,7 +48,7 @@ function read_stale_data($instanceId, $databaseId) 'Albums', $keySet, ['SingerId', 'AlbumId', 'AlbumTitle'], - ['exactStaleness' => new Duration(10)] + ['exactStaleness' => new Duration(15)] ); foreach ($results->rows() as $row) { diff --git a/spanner/test/spannerTest.php b/spanner/test/spannerTest.php index 11896e4f22..fcd78e5c0c 100644 --- a/spanner/test/spannerTest.php +++ b/spanner/test/spannerTest.php @@ -223,11 +223,11 @@ public function testReadOnlyTransaction() */ public function testReadStaleData() { - // read-stale-data reads data that is exactly 10 seconds old. So, make sure 10 seconds + // read-stale-data reads data that is exactly 15 seconds old. So, make sure 15 seconds // have elapsed since testUpdateData(). $elapsed = time() - self::$lastUpdateDataTimestamp; - if ($elapsed < 11) { - sleep(11 - $elapsed); + if ($elapsed < 16) { + sleep(16 - $elapsed); } $output = $this->runCommand('read-stale-data'); $this->assertContains('SingerId: 1, AlbumId: 1, AlbumTitle: Go, Go, Go', $output);