diff --git a/tests/e2e/Services/Databases/DatabasesBase.php b/tests/e2e/Services/Databases/DatabasesBase.php index ed2cfff315..0dd592ba21 100644 --- a/tests/e2e/Services/Databases/DatabasesBase.php +++ b/tests/e2e/Services/Databases/DatabasesBase.php @@ -2990,13 +2990,13 @@ trait DatabasesBase '$databaseId' => 'some-other-database', '$createdAt' => '2024-01-01T00:00:00Z', '$updatedAt' => '2024-01-01T00:00:00Z', - ], 'library' => [ '$id' => 'library3', 'libraryName' => 'Library 3', '$createdAt' => '2024-01-01T00:00:00Z', '$updatedAt' => '2024-01-01T00:00:00Z', ], + ], ]); $update = $personNoPerm; diff --git a/tests/e2e/Services/Databases/Legacy/DatabasesStringTypesTest.php b/tests/e2e/Services/Databases/Legacy/DatabasesStringTypesTest.php index a583d7c64a..c8c8971626 100644 --- a/tests/e2e/Services/Databases/Legacy/DatabasesStringTypesTest.php +++ b/tests/e2e/Services/Databases/Legacy/DatabasesStringTypesTest.php @@ -246,8 +246,6 @@ class DatabasesStringTypesTest extends Scope $this->assertEquals(202, $varcharEncrypted['headers']['status-code']); $this->assertTrue($varcharEncrypted['body']['encrypt']); - - return $data; } public function testCreateVarcharAttributeFailures(): void @@ -410,8 +408,6 @@ class DatabasesStringTypesTest extends Scope $this->assertEquals(202, $textEncrypted['headers']['status-code']); $this->assertTrue($textEncrypted['body']['encrypt']); - - return $data; } public function testCreateMediumtextAttribute(): void @@ -474,8 +470,6 @@ class DatabasesStringTypesTest extends Scope $this->assertEquals(202, $mediumtextEncrypted['headers']['status-code']); $this->assertTrue($mediumtextEncrypted['body']['encrypt']); - - return $data; } public function testCreateLongtextAttribute(): void @@ -538,15 +532,11 @@ class DatabasesStringTypesTest extends Scope $this->assertEquals(202, $longtextEncrypted['headers']['status-code']); $this->assertTrue($longtextEncrypted['body']['encrypt']); - - return $data; } - /** - * @depends testCreateLongtextAttribute - */ - public function testListStringTypeAttributes(array $data): array + public function testListStringTypeAttributes(): void { + $data = $this->setupDatabaseAndCollection(); $databaseId = $data['databaseId']; $collectionId = $data['collectionId']; @@ -568,15 +558,11 @@ class DatabasesStringTypesTest extends Scope $this->assertContains('text', $types); $this->assertContains('mediumtext', $types); $this->assertContains('longtext', $types); - - return $data; } - /** - * @depends testListStringTypeAttributes - */ - public function testGetCollectionWithStringTypeAttributes(array $data): array + public function testGetCollectionWithStringTypeAttributes(): void { + $data = $this->setupDatabaseAndCollection(); $databaseId = $data['databaseId']; $collectionId = $data['collectionId']; @@ -595,14 +581,9 @@ class DatabasesStringTypesTest extends Scope $this->assertContains('text', $types); $this->assertContains('mediumtext', $types); $this->assertContains('longtext', $types); - - return $data; } - /** - * @depends testGetCollectionWithStringTypeAttributes - */ - public function testUpdateVarcharAttribute(array $data): array + public function testUpdateVarcharAttribute(): void { $this->markTestSkipped('Skipped until utopia-php/database updateAttribute supports VARCHAR type'); } diff --git a/tests/e2e/Services/Sites/SitesBase.php b/tests/e2e/Services/Sites/SitesBase.php index c7721bb8b5..5fc0d40fec 100644 --- a/tests/e2e/Services/Sites/SitesBase.php +++ b/tests/e2e/Services/Sites/SitesBase.php @@ -69,12 +69,7 @@ trait SitesBase // Not === so multipart/form-data works fine too if (($params['activate'] ?? false) == true) { - // Wait briefly for auto-activation, then explicitly activate if needed - $activated = false; - $autoActivateTimeout = 30000; // 30 seconds for auto-activation - $start = \microtime(true); - - while ((\microtime(true) - $start) * 1000 < $autoActivateTimeout) { + $this->assertEventually(function () use ($siteId, $deploymentId) { $site = $this->client->call(Client::METHOD_GET, '/sites/' . $siteId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'],