mirror of
https://github.com/FerretDB/documentdb.git
synced 2026-11-06 19:12:50 -05:00
### Does this PR have any customer impact? No ### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc) Testing ### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes) No ### Are you introducing any new config? If yes, do you have tests with and without them being set? No ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description Fix OSS background worker tests ---- #### AI description (iteration 1) #### PR Classification This pull request fixes failing background worker tests by ensuring proper worker initialization and improving error handling. #### PR Summary The changes add waiting procedures in test helper SQL scripts to guarantee that background workers are fully launched before tests run, while also enhancing error logging and renaming configuration functions for clarity. - `documentdb_distributed_test_helpers.sql`, `documentdb_test_helpers.sql`, and `pgmongo_test_helpers.sql`: Introduced a stored procedure that loops until the appropriate background worker is detected, with corresponding calls added in the test scripts. - Expected output files (`documentdb_distributed_test_helpers.out`, `documentdb_test_helpers.out`, and `pgmongo_test_helpers.out`) now include these wait procedures to align with the new test logic. - `background_worker.c`: Modified the error handling in the background worker command generation to capture and log detailed error metadata (filename, line number, message_id). - `documentdb_init.c` and `background_job_configs.c` (along with header changes): Renamed and updated configuration functions from `InitDocumentDBBackgroundWorkerGucs` to `InitDocumentDBBackgroundWorkerConfigurations` and adjusted naming from `build_index_background` to `command_build_index_background`. - `postgresql.conf` files in multiple directories: Updated background worker settings by setting the background worker database name to 'regression'. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->