1
0
Fork 0
mirror of synced 2024-06-29 11:40:45 +12:00

Clean up unneeded sleeps in db tests

This commit is contained in:
kodumbeats 2021-10-05 10:10:40 -04:00
parent 5735c5d129
commit 0960a54169

View file

@ -654,8 +654,6 @@ trait DatabaseBase
'required' => false,
]);
sleep(2);
$ip = $this->client->call(Client::METHOD_POST, '/database/collections/' . $collectionId . '/attributes/ip', array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
@ -665,8 +663,6 @@ trait DatabaseBase
'required' => false,
]);
sleep(2);
$url = $this->client->call(Client::METHOD_POST, '/database/collections/' . $collectionId . '/attributes/url', array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
@ -677,8 +673,6 @@ trait DatabaseBase
'required' => false,
]);
sleep(2);
$range = $this->client->call(Client::METHOD_POST, '/database/collections/' . $collectionId . '/attributes/integer', array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
@ -690,8 +684,6 @@ trait DatabaseBase
'max' => 10,
]);
sleep(2);
// TODO@kodumbeats min and max are rounded in error message
$floatRange = $this->client->call(Client::METHOD_POST, '/database/collections/' . $collectionId . '/attributes/float', array_merge([
'content-type' => 'application/json',
@ -704,8 +696,6 @@ trait DatabaseBase
'max' => 1.4,
]);
sleep(2);
// TODO@kodumbeats float validator rejects 0.0 and 1.0 as floats
// $probability = $this->client->call(Client::METHOD_POST, '/database/collections/' . $collectionId . '/attributes/float', array_merge([
// 'content-type' => 'application/json',
@ -728,8 +718,6 @@ trait DatabaseBase
'max' => 10,
]);
sleep(2);
$lowerBound = $this->client->call(Client::METHOD_POST, '/database/collections/' . $collectionId . '/attributes/integer', array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
@ -766,7 +754,7 @@ trait DatabaseBase
// $this->assertEquals('Minimum value must be lesser than maximum value', $invalidRange['body']['message']);
// wait for worker to add attributes
sleep(2);
sleep(3);
$collection = $this->client->call(Client::METHOD_GET, '/database/collections/' . $collectionId, array_merge([
'content-type' => 'application/json',