Skip to content

Conversation

@mkleczek
Copy link
Contributor

To make schema cache loading wait tests robust it is necessary to provide three separate internal config variables:

  • "internal-schema-cache-query-sleep" - introduces delay in schema queries execution
  • "internal-schema-cache-load-sleep" - introduces delay between schema queries execution and processing their results
  • "internal-schema-cache-relationship-load-sleep" - introduces delay in processing relationship query results

Thanks to these changes it is now possible to test various schema loading scenarios with the right granularity robustly (eg. make sure requests wait for schema loading but not for relationship loading).

To make schema cache loading wait tests robust it is necessary to provide three separate internal config variables:
* "internal-schema-cache-query-sleep" - introduces delay in schema queries execution
* "internal-schema-cache-load-sleep" - introduces delay between schema queries execution and processing their results
* "internal-schema-cache-relationship-load-sleep" - introduces delay in processing relationship query results

Thanks to these changes it is now possible to test various schema loading scenarios with the right granularity robustly (eg. make sure requests wait for schema loading but not for relationship loading).
@mkleczek mkleczek force-pushed the separate-query-load-relationship-internal-configs branch from 778662b to 3dde9b3 Compare October 17, 2025 10:00
Copy link
Member

@steve-chavez steve-chavez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect 🥇, tests look clearer now.

@steve-chavez steve-chavez merged commit c08b877 into PostgREST:main Oct 17, 2025
32 of 33 checks passed
@mkleczek mkleczek deleted the separate-query-load-relationship-internal-configs branch October 21, 2025 03:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants