Move all TablesDB* test files from tests/e2e/Services/Databases/ to a
new tests/e2e/Services/TablesDB/ directory, updating namespaces and
adding explicit imports for shared base traits. Add TablesDB as a
separate service in the CI matrix so /v1/databases and /v1/tables tests
run as independent parallel jobs.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update testBlockedAccount and testSelfBlockedAccount to expect 403
instead of 401 for blocked user responses. These were missed in the
previous test assertion update.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Remove specific index length number from testPatchAttribute assertion
since the value differs between shared/non-shared table modes (767 vs
768) and the console API returns the console project's value, not the
user project's
- Use getLastEmailByAddress in testPasswordRecoveryUrlParams to avoid
retrieving emails from parallel test classes sharing the same maildev
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Use getLastEmailByAddress for SMTP tests instead of getLastEmail(2) to
avoid shared mail server state issues under parallel execution
- Add retry logic to setupProject, setupProjectData, and
setupScheduleProjectData for intermittent 401 errors
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Realtime E2E tests were taking 24+ minutes due to intentional timeout waits. Many tests verify event filtering by expecting a TimeoutException, and each was waiting 45 seconds.
Changes:
- Reduce default WebSocket timeout from 45s to 2s in RealtimeBase
- Add optional timeout parameter to getWebsocket() methods
- Use longer timeouts (5-10s) for tests that legitimately wait for slow operations (function executions, test channel events)
- Use named parameters for improved readability
Performance impact:
- Before: 24:07 minutes (1,447 seconds)
- After: 1:09 minutes (69 seconds)
- Speedup: ~21x faster
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
The testListDocumentsWithCache and testListDocumentsCacheBustedByAttributeChange
tests were failing because testCreateDocument (which runs earlier) adds 3 more
documents to the same movies collection, resulting in 6 docs instead of expected 3.
Additionally, the cache bust test was getting a cache 'hit' instead of 'miss' on
its first request due to sharing the same cache key as the previous test.
Fix by filtering all cache test queries to the 3 known setup document IDs, and
using distinct select/order queries in each test to avoid cache key collisions.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix indentation alignment in cache hit detection condition
- Add total count assertions for cached and non-cached responses in test
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Same cache-before-wait pattern as DatabasesBase to prevent
cascading 409 failures when attribute polling times out.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When setupAttributes() or setupIndexes() timed out during
waitForAllAttributes/waitForAllIndexes, the cache was never populated.
Subsequent test methods calling setup again would find empty cache,
reuse the same collection IDs (from collection cache), and attempt to
re-create existing attributes/indexes, resulting in 409 Conflict errors.
Fix: populate the static cache immediately after successful creation
(202 assertions), before the wait calls. This ensures retries skip
creation and go straight to waiting.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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>
- 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>
- 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>
- Fix testPasswordRecoveryUrlParams: use URL-based probes instead of
userId-based probes to distinguish between test cases that share the
same user
- Enable functions.* webhook events in ProjectCustom for function
webhook tests that were silently passing by matching stale events
- Fix setupTeamMembership: add email address probe to getLastEmail to
prevent picking up wrong invitation email
- Fix getLastEmail multi-email race: assert count inside assertEventually
when requesting multiple emails
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add probe callback support to getLastEmail(), getLastEmailByAddress(),
and getLastRequest() to filter results by content before accepting
- Fix variable name typo in TeamsCustomClientTest ($email vs $lastEmail)
- Add event probes to all 56 webhook test getLastRequest() calls to
filter by specific event pattern (resource ID + action)
- Add email probes to Account OTP/recovery/magic-url tests to wait for
the correct email (security phrase, Password Reset subject, etc.)
- Add email probes to Projects tests for recovery email URL matching
- Increase FunctionsSchedule future time from 1min to 2min to avoid
timing issues when seconds are zeroed
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>