Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion spanner/src/read_stale_data.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
6 changes: 3 additions & 3 deletions spanner/test/spannerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down