Commit Graph

62 Commits

Author SHA1 Message Date
Jake Barnby bada1a7c05 Timing updates 2026-02-24 14:00:07 +13:00
Jake Barnby 89f0f227d6 fix: resolve CI failures in database, functions, and realtime tests
- Increase SchemaPolling default timeouts from 8min to 15min for
  waitForAttribute, waitForAttributes, waitForAttributeCount, and
  waitForIndex to match waitForAllAttributes/waitForAllIndexes. Under
  parallel test load the database worker gets backlogged, causing
  attributes to stay in 'processing' state longer than 8 minutes.
- Add isEmpty check in Functions Delete before updating schedules to
  prevent 500 errors when the schedule document is missing (consistent
  with other modules like Executions/Delete).
- Add retry logic to cleanupFunction in FunctionsBase for transient
  MongoDB transaction abort errors during function deletion.
- Increase Realtime attribute/index polling timeouts from 2min to 15min
  to handle worker backlog under CI load.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 17:22:51 +13:00
Jake Barnby 2a535a2adc fix: exclude ciIgnore tests from CI and increase Realtime polling timeouts
- Add --exclude-group ciIgnore to paratest commands in tests.yml
  (the @group ciIgnore annotation was defined but never excluded)
- Increase attribute/index polling timeouts in RealtimeConsoleClientTest
  from 15s to 120s for Shared V2 stability

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 03:10:56 +13:00
Jake Barnby 9796c46975 fix: misplaced assertion in testUpdateAttributeEnum and reduce timeouts
- Move maxLength/assertStringContainsString from testUpdateAttributeEnum
  back to testPatchAttribute where $attribute is defined
- Fix remaining $data['moviesId'] -> $moviesId in testCreateAttributes
- Reduce WebSocket timeout from 30s to 15s for faster failure detection
- Reduce Realtime helper assertEventually from 30s to 15s

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 15:07:05 +13:00
Jake Barnby 2c1919140f fix: resolve additional test failures from CI results
DatabasesBase:
- testCreateAttributes: use local $moviesId/$actorsId instead of $data['...']
- testValidateOperators: add missing setupOneToManyRelationship() call
- testSelectQueries: add missing setupOneToManyRelationship() call
- testUniqueIndexDuplicate: define missing $serverHeaders variable
- testListDocuments: change return type from array to void (no callers)

RealtimeConsoleClientTest:
- testAttributesCollectionsAPI: create database/collection before opening
  WebSocket to prevent their events from interfering with attribute events
- testAttributesTablesAPI: same restructuring for TablesDB variant

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 14:42:41 +13:00
Jake Barnby acad17f3b8 fix: resolve test failures and reduce excessive timeouts
- DatabasesBase: fix 5 merge corruption issues (missing integers2 attr,
  undefined vars, wrong assertion, wrong setup method)
- WebhooksBase: increase deployment build timeout from 10s to 120s
- RealtimeBase: reduce WebSocket timeout 120s→30s, fix deprecated nullable
- RealtimeConsoleClientTest: reduce assertEventually 120s→30s
- SchemaPolling: reduce all default timeouts 600s→60s
- SitesBase: reduce build timeout 300s→120s, activation 200s→60s

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 14:23:42 +13:00
Jake Barnby 39b6aad959 fix: Use 'columns' instead of 'attributes' for TablesDB index creation
The TablesDB index creation API requires 'columns' parameter, not
'attributes' (which is the collections API parameter). This caused
testDeleteIndexTablesAPI to always fail because the index was never
actually created.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 22:11:18 +13:00
Jake Barnby 7bfae7c2c3 fix: Add diagnostic assertions to Realtime test helpers
Add response status checks on all creation calls (database, table,
column, index) to catch silent failures early and provide diagnostic
info instead of mysterious 404s during polling.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 21:26:16 +13:00
Jake Barnby b597fb9956 fix: Replace sleep(5) with proper polling and increase timeouts in Realtime tests
The Realtime test helpers used fragile sleep(5) for attribute/index
creation and had short polling timeouts (30s/60s) that fail under CI
parallel load. Replaced with assertEventually polling and increased
all timeouts to 120s.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 20:42:15 +13:00
Jake Barnby d617f89642 fix: Fix parallel test failures across Databases, GraphQL, Realtime, and Account
- DatabasesBase: Wait for twoWayKey attribute on library collection in
  setupOneToManyRelationship; use server API key headers for document creation
- DatabasesStringTypesTest: Add delays between attribute creation batches to
  avoid overwhelming the database worker
- SchemaPolling: Improve waitForAllAttributes error messaging
- GraphQL UsersTest: Use fresh user in testDeleteUserSession to avoid
  session conflicts
- Realtime: Increase WebSocket timeout to 120s and index polling to 60s
- Account: Add better error reporting for phone session creation failures

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 16:08:55 +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 02240fd14f fix: Correct TablesDB API paths in Realtime test helpers
- Use /databases endpoint instead of /tablesdb for database creation
- Use /columns/string instead of /attributes/string for table columns
- Fix testAttributesCollectionsAPI return type from array to void

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 04:46:59 +13:00
Jake Barnby 2e9c1b4745 fix: Remove @depends chains from Realtime tests for parallel execution
- Add helper methods createCollectionWithAttribute(), createTableWithAttribute(),
  createCollectionWithIndex(), createTableWithIndex() to RealtimeConsoleClientTest
- Add createTeam() helper to RealtimeCustomClientTest
- Replace all @depends annotations with direct helper method calls
- Enable tests to run in parallel with --functional flag

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 04:28:12 +13:00
Jake Barnby 714b8d7ea6 Migrate to PHPUnit 11 2026-01-15 16:14:53 +13:00
Jake Barnby ca03be5e41 Test fixes 2025-08-18 21:16:01 +12:00
Darshan 7a5a3706b6 fix: tests. 2025-07-27 18:13:30 +05:30
Jake Barnby 9ceeb76ad0 Merge branch '1.7.x' into 1.8.x
# Conflicts:
#	app/controllers/api/databases.php
#	composer.lock
#	src/Appwrite/GraphQL/Types/Mapper.php
2025-07-18 17:24:12 +12:00
Matej Bačo 5ace34790d Migrate many tests to JS 2025-07-09 16:58:55 +02:00
Jake Barnby b2fa28754d Merge remote-tracking branch 'origin/1.7.x' into 1.8.x
# Conflicts:
#	.github/workflows/benchmark.yml
#	composer.lock
#	src/Appwrite/Event/Database.php
2025-07-04 10:00:45 -04:00
Matej Bačo b6d4baf4dc Fix tests 2025-06-25 13:14:08 +02:00
Darshan 1ac22c0ae0 Merge branch '1.8.x' into 'database-aliases'. 2025-06-11 12:36:33 +05:30
Matej Bačo 2bee98afcf Fix remaining tests 2025-05-18 12:51:07 +02:00
Matej Bačo 3b38b6bb57 Migration review fixes 2025-05-12 16:52:13 +02:00
Darshan 94fbf19e54 fix|add: tables api tests to realtime. 2025-05-09 15:11:14 +05:30
Darshan 9e1105b61f update: tests. 2025-05-06 11:29:56 +05:30
Darshan f94ecc885a fix: tests as per new events system. 2025-04-27 10:36:21 +05:30
Matej Bačo 3c8e4da34d Update tests 2025-03-26 17:04:38 +01:00
Matej Bačo 828b9349c3 Improve build worker realtime, new tests 2025-03-17 13:21:36 +01:00
loks0n e0bd500aa2 fix: realtime event 2024-10-07 15:58:34 +01:00
loks0n 6dab42e59a chore: use project injectable 2024-10-07 14:00:19 +01:00
Torsten Dittmann 04bc24f42b tests: fix merge conflict 2024-10-03 11:20:47 +02:00
Torsten Dittmann ec77ab1007 Merge branch '1.6.x' of https://github.com/appwrite/appwrite into migrations-backups 2024-10-03 11:13:44 +02:00
Torsten Dittmann bb20b3f52c feat(realtime): projects channels 2024-09-30 16:32:50 +02:00
loks0n cb0416be7b chore: fmt 2024-09-19 21:08:04 +01:00
Torsten Dittmann 0a1d572c72 chore: run formatter 2024-03-06 18:34:21 +01:00
Christy Jacob 050cb28d4f fix: incorrect events 2023-10-18 20:30:47 +04:00
Christy Jacob 5f9059e221 chore: run linter 2023-10-18 19:50:40 +04:00
Christy Jacob 2a201a9d1c chore: fix flaky tests 2023-10-18 19:42:23 +04:00
Jake Barnby 18f86b057d Test fixes 2023-08-30 01:31:21 -04:00
Matej Bačo 897d299ae6 PR review changes, fixes from QA 2023-08-11 15:34:57 +02:00
Steven Nguyen aa3c2faed9 Merge tag '1.3.8' into cloud-1.3.x-2 2023-08-04 13:55:07 -07:00
Damodar Lohani f59d3563f4 Merge remote-tracking branch 'origin/feat-db-pools-master' into feat-db-pools-db-pools-master-sync 2023-07-10 03:06:48 +00:00
Christy Jacob 18f5418f5c chore: update tests 2023-06-15 13:23:15 +00:00
Torsten Dittmann 6e5b8fab4b fix: implement new framework changes 2023-03-01 17:30:36 +05:30
shimon 5850a454e0 addressing comments 2023-02-05 22:07:46 +02:00
fogelito 8ade726932 Changing Role + Permissions namespace 2022-12-14 18:04:06 +02:00
fogelito f96128e14f Changing Id 2022-12-14 17:42:25 +02:00
Steven Nguyen ab2bb8176c Fix create deployment realtime not triggering
Because the deployment event was missing the project ID, the realtime
event never fired.
2022-10-25 13:38:04 -07:00
Jake Barnby b007acfa95 ID updates 2022-08-14 22:33:36 +12:00