Commit graph

16 commits

Author SHA1 Message Date
Chirag Aggarwal
18ed6a9c59 Fix more PHPStan static access issues 2026-03-31 22:04:37 +05:30
Jake Barnby
e1791e17c3 fix: increase attribute/index polling timeouts to 240s for shared mode CI
Shared tables mode experiences significant worker queue contention during
parallel test execution. 120s was insufficient for attribute processing
in Shared V1 mode and occasionally for PostgreSQL under load.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 17:50:46 +13:00
Jake Barnby
9a97694a19 fix: resolve flaky E2E tests for realtime, avatars, migrations, and GraphQL
- Realtime: Use getLastEmailByAddress with userId probe instead of getLastEmail
  to prevent email race conditions in parallel execution; add status assertions
  on verification/recovery PUT responses for clearer failure diagnostics
- Avatars: Wrap external URL image fetches in assertEventually to retry
  transient network failures from appwrite.io
- Migrations: Increase performMigrationSync timeout from 10s to 60s
- GraphQL: Increase attribute polling timeouts from 60s to 120s with 500ms
  intervals to accommodate PostgreSQL under CI load

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 16:51:22 +13:00
Jake Barnby
7df86a3838 fix: cast attribute defaults after queue deserialization and improve test robustness
- Fix float/int/bool attribute creation failures caused by type loss
  during queue serialization in the Databases worker
- Rework session limit test to retry session creation for cache
  propagation in shared mode
- Increase GraphQL attribute polling timeouts from 30s to 60s
- Increase SchemaPolling waitForAllAttributes timeout to 180s
- Increase Realtime WebSocket client timeout from 30s to 45s

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 16:02:23 +13:00
Jake Barnby
bada1a7c05 Timing updates 2026-02-24 14:00:07 +13:00
Jake Barnby
1b9d0ca1c6 fix: Fix remaining parallel-safety issues from CI iteration 2
- Fix DB relationship tests: use ID::unique() for person/library collections
- Fix DB StringTypesTest: use waitForAllAttributes instead of sleep(3)
- Fix DB permissions tests: update expected counts for parallel mode
- Fix Account OAuth tests: clean up shared mock OAuth email before use
- Fix Account phone tests: ensure phone auth enabled, unique phone numbers
- Fix Messaging: compare datetime via timestamps, accept processing state
- Fix GraphQL testGetColumn: call setupStringColumn instead of setupTable
- Fix Projects: update mock numbers error message assertion

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 14:55:41 +13:00
Jake Barnby
161e4e53d4 fix: Address remaining parallel-safety failures across all test suites
- Fix Legacy DatabasesStringTypesTest with project-keyed setup cache
- Fix Account OTP test with unique email, phone session re-login
- Fix GraphQL setup methods with sleep, 409 handling, missing columns
- Fix Databases list/pagination tests with document ID filtering
- Fix Permissions tests with assertGreaterThanOrEqual for counts
- Fix Messaging scheduled tests to not depend on scheduler timing
- Increase Realtime WebSocket timeout to 60s and assertEventually to 30s

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 14:20:42 +13:00
Jake Barnby
2da4211f69 fix: Make E2E tests parallel-safe for functional mode
- Fix missing return statement in DatabasesBase::testListDocuments
- Rewrite DatabasesStringTypesTest with project-keyed setup cache
- Use assertGreaterThanOrEqual in Functions testListDeployments
- Clean up OIDC provider after Account OAuth2 test
- Key all GraphQL static caches by project ID with unique IDs
- Replace sleep() with assertEventually in Realtime tests
- Increase Messaging scheduled message timeout to 180s
- Increase Sites deployment timeouts to 120s

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 13:25:19 +13:00
Jake Barnby
1f17dca7c9 fix: Handle 409 conflicts in GraphQL TablesDB tests
- setupDatabase() now fetches existing database on conflict
- setupTable() now fetches existing tables on conflict
- Enables parallel test execution with fixed resource IDs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 20:56:45 +13:00
Jake Barnby
2a3e2d8be5 perf: Remove @depends from all GraphQL tests
Added helper methods with static caching for:
- Legacy/DatabaseClientTest.php
- Legacy/DatabaseServerTest.php
- TablesDB/DatabaseClientTest.php
- TablesDB/DatabaseServerTest.php

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 12:01:31 +13:00
Jake Barnby
1d03af22e4 Add missing PHPUnit #[Depends] attributes to GraphQL tests
PHPUnit 11 requires explicit #[Depends] attributes. The migration removed
@depends annotations but didn't add all corresponding #[Depends] attributes.

Fixed in:
- GraphQL/Legacy/DatabaseClientTest: 5 methods
- GraphQL/StorageClientTest: 7 methods
- GraphQL/StorageServerTest: 10 methods
- GraphQL/TeamsServerTest: 3 methods
- GraphQL/TeamsClientTest: 2 methods
- GraphQL/TablesDB/DatabaseServerTest: ~40 methods
- GraphQL/TablesDB/DatabaseClientTest: 5 methods

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 18:10:30 +13:00
Jake Barnby
714b8d7ea6 Migrate to PHPUnit 11 2026-01-15 16:14:53 +13:00
Jake Barnby
842dce2659
Update tablesDb -> tablesDB 2025-08-21 02:20:05 +12:00
Jake Barnby
b965d1077c
More fix namespace 2025-08-20 01:41:46 +12:00
Jake Barnby
6d2832831c
Remove weird static/const mix 2025-08-19 23:03:18 +12:00
Jake Barnby
670e869855
Migrate to TablesDB 2025-08-18 19:15:49 +12:00
Renamed from tests/e2e/Services/GraphQL/Grids/DatabaseServerTest.php (Browse further)