mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
fix: increase all schema polling default timeouts to 10 minutes
Under parallel CI load with MariaDB, attribute processing frequently exceeds the previous 5-minute default timeout. Increased all polling defaults (waitForAttribute, waitForAttributes, waitForAttributeCount, waitForAllAttributes, waitForIndex, waitForAllIndexes) to 10 minutes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -19,7 +19,7 @@ trait SchemaPolling
|
||||
* @param int $timeoutMs Maximum time to wait in milliseconds
|
||||
* @param int $waitMs Time between polling attempts in milliseconds
|
||||
*/
|
||||
protected function waitForAttribute(string $databaseId, string $containerId, string $attributeKey, int $timeoutMs = 300000, int $waitMs = 500): void
|
||||
protected function waitForAttribute(string $databaseId, string $containerId, string $attributeKey, int $timeoutMs = 600000, int $waitMs = 500): void
|
||||
{
|
||||
$this->assertEventually(function () use ($databaseId, $containerId, $attributeKey) {
|
||||
$attribute = $this->client->call(
|
||||
@@ -46,7 +46,7 @@ trait SchemaPolling
|
||||
* @param int $timeoutMs Maximum time to wait in milliseconds
|
||||
* @param int $waitMs Time between polling attempts in milliseconds
|
||||
*/
|
||||
protected function waitForAttributes(string $databaseId, string $containerId, array $attributeKeys, int $timeoutMs = 300000, int $waitMs = 500): void
|
||||
protected function waitForAttributes(string $databaseId, string $containerId, array $attributeKeys, int $timeoutMs = 600000, int $waitMs = 500): void
|
||||
{
|
||||
$this->assertEventually(function () use ($databaseId, $containerId, $attributeKeys) {
|
||||
$container = $this->client->call(
|
||||
@@ -87,7 +87,7 @@ trait SchemaPolling
|
||||
* @param int $timeoutMs Maximum time to wait in milliseconds
|
||||
* @param int $waitMs Time between polling attempts in milliseconds
|
||||
*/
|
||||
protected function waitForAttributeCount(string $databaseId, string $containerId, int $count, int $timeoutMs = 180000, int $waitMs = 500): void
|
||||
protected function waitForAttributeCount(string $databaseId, string $containerId, int $count, int $timeoutMs = 600000, int $waitMs = 500): void
|
||||
{
|
||||
$this->assertEventually(function () use ($databaseId, $containerId, $count) {
|
||||
$container = $this->client->call(
|
||||
@@ -126,7 +126,7 @@ trait SchemaPolling
|
||||
* @param int $timeoutMs Maximum time to wait in milliseconds
|
||||
* @param int $waitMs Time between polling attempts in milliseconds
|
||||
*/
|
||||
protected function waitForIndex(string $databaseId, string $containerId, string $indexKey, int $timeoutMs = 300000, int $waitMs = 500): void
|
||||
protected function waitForIndex(string $databaseId, string $containerId, string $indexKey, int $timeoutMs = 600000, int $waitMs = 500): void
|
||||
{
|
||||
$this->assertEventually(function () use ($databaseId, $containerId, $indexKey) {
|
||||
$index = $this->client->call(
|
||||
@@ -154,7 +154,7 @@ trait SchemaPolling
|
||||
* @param int $timeoutMs Maximum time to wait in milliseconds
|
||||
* @param int $waitMs Time between polling attempts in milliseconds
|
||||
*/
|
||||
protected function waitForAllIndexes(string $databaseId, string $containerId, int $timeoutMs = 300000, int $waitMs = 500): void
|
||||
protected function waitForAllIndexes(string $databaseId, string $containerId, int $timeoutMs = 600000, int $waitMs = 500): void
|
||||
{
|
||||
$this->assertEventually(function () use ($databaseId, $containerId) {
|
||||
$container = $this->client->call(
|
||||
@@ -182,10 +182,10 @@ trait SchemaPolling
|
||||
*
|
||||
* @param string $databaseId The database ID
|
||||
* @param string $containerId The collection/table ID
|
||||
* @param int $timeoutMs Maximum time to wait in milliseconds (default 5 minutes for CI stability under parallel load)
|
||||
* @param int $timeoutMs Maximum time to wait in milliseconds (default 10 minutes for CI stability under parallel load)
|
||||
* @param int $waitMs Time between polling attempts in milliseconds
|
||||
*/
|
||||
protected function waitForAllAttributes(string $databaseId, string $containerId, int $timeoutMs = 300000, int $waitMs = 500): void
|
||||
protected function waitForAllAttributes(string $databaseId, string $containerId, int $timeoutMs = 600000, int $waitMs = 500): void
|
||||
{
|
||||
$this->assertEventually(function () use ($databaseId, $containerId) {
|
||||
$container = $this->client->call(
|
||||
|
||||
@@ -240,8 +240,8 @@ trait DatabasesBase
|
||||
$this->assertEquals(202, $relationship['headers']['status-code']);
|
||||
$this->assertEquals(202, $integers['headers']['status-code']);
|
||||
|
||||
// wait for database worker to create attributes (longer timeout for MariaDB under parallel load)
|
||||
$this->waitForAllAttributes($databaseId, $data['moviesId'], 600000);
|
||||
// wait for database worker to create attributes
|
||||
$this->waitForAllAttributes($databaseId, $data['moviesId']);
|
||||
|
||||
self::$attributesCache[$cacheKey] = $data;
|
||||
return self::$attributesCache[$cacheKey];
|
||||
@@ -9132,8 +9132,8 @@ trait DatabasesBase
|
||||
|
||||
$this->assertEquals(202, $poly['headers']['status-code']);
|
||||
|
||||
// Wait for attributes to be available (longer timeout for MariaDB spatial columns under parallel load)
|
||||
$this->waitForAllAttributes($databaseId, $colId, 600000);
|
||||
// Wait for attributes to be available
|
||||
$this->waitForAllAttributes($databaseId, $colId);
|
||||
|
||||
// Create a new document without spatial data to test default values
|
||||
$newDocument = $this->client->call(Client::METHOD_POST, $this->getRecordUrl($databaseId, $colId), array_merge([
|
||||
|
||||
Reference in New Issue
Block a user