Skip to content

Commit

Permalink
Revert "feat(Datastore): change sleep time to 1 second"
Browse files Browse the repository at this point in the history
This reverts commit b4c814b.
  • Loading branch information
ajupazhamayil committed Dec 30, 2022
1 parent ff152ab commit 8252565
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions Datastore/tests/System/LookupTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,17 @@ public function testLookupWithReadTime(DatastoreClient $client)
$client->insert($person);
self::$localDeletionQueue->add($key);

sleep(1);
sleep(2);

$time = new Timestamp(['seconds' => time()]);

sleep(1);
sleep(2);

$person = $client->lookup($key);
$person['lastName'] = $newLastName;
$client->update($person);

sleep(1);
sleep(2);

// Person lastName should be the lastName AFTER update
$person = $client->lookup($key);
Expand All @@ -77,17 +77,17 @@ public function testLookupBatchWithReadTime(DatastoreClient $client)
$client->insert($person);
self::$localDeletionQueue->add($key);

sleep(1);
sleep(2);

$time = new Timestamp(['seconds' => time()]);

sleep(1);
sleep(2);

$person = $client->lookup($key);
$person['lastName'] = $newLastName;
$client->update($person);

sleep(1);
sleep(2);

// Person lastName should be the lastName AFTER update
$person = $client->lookupBatch([$key]);
Expand Down
6 changes: 3 additions & 3 deletions Datastore/tests/System/RunQueryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -347,17 +347,17 @@ public function testRunQueryWithReadTime(DatastoreClient $client)
$client->insert($person);
self::$localDeletionQueue->add($key);

sleep(1);
sleep(2);

$time = new Timestamp(['seconds' => time()]);

sleep(1);
sleep(2);

$person = $client->lookup($key);
$person['lastName'] = $newLastName;
$client->update($person);

sleep(1);
sleep(2);

$query = $client->query()
->kind($kind)
Expand Down
6 changes: 3 additions & 3 deletions Datastore/tests/System/RunTransactionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,19 +98,19 @@ public function testTransactionWithReadTime(DatastoreClient $client)
self::$localDeletionQueue->add($ancKey);
self::$localDeletionQueue->add($key);

sleep(1);
sleep(2);

$time = new Timestamp(['seconds' => time()]);

sleep(1);
sleep(2);

$transaction = $client->transaction();
$person = $transaction->lookup($key);
$person['lastName'] = $newLastName;
$transaction->update($person);
$transaction->commit();

sleep(1);
sleep(2);

$query = $client->query()
->kind($kind)
Expand Down

0 comments on commit 8252565

Please sign in to comment.