Skip to content

test: move schema cache observation tests to io tests - #5169

Open
taimoorzaeem wants to merge 2 commits into
PostgREST:mainfrom
taimoorzaeem:test/obs/move-scache-tests
Open

test: move schema cache observation tests to io tests#5169
taimoorzaeem wants to merge 2 commits into
PostgREST:mainfrom
taimoorzaeem:test/obs/move-scache-tests

Conversation

@taimoorzaeem

Copy link
Copy Markdown
Member

Gradually moving towards #4868, where we agreed on removing observability test-suite and merge its tests in io-tests suite.

It's better to separate them so the config is tested in isolation.

Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com>
Gradually moving towards PostgREST#4868, where we agreed on removing
observability test-suite and merge its tests in io-tests suite.

Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com>
@taimoorzaeem taimoorzaeem added the tests Related to tests label Aug 17, 2026
@steve-chavez
steve-chavez requested a review from mkleczek August 17, 2026 16:08
@mkleczek

Copy link
Copy Markdown
Collaborator

Gradually moving towards #4868, where we agreed on removing observability test-suite and merge its tests in io-tests suite.

I am not really convinced we should get rid of Haskell tests - I find them very useful to pinpoint issues as they test pieces of finer granularity. Secondly, io test are slow as hell in comparison and make rapid iterations painful.

That's my personal take on it though and it is up to @wolfgangwalther and @steve-chavez to decide.

Comment thread test/io/test_log.py
assert any(pool_flushed_obs in line for line in output)
assert any(re.search(schema_cache_queried_in_obs, line) for line in output)
assert any(re.search(schema_cache_loaded_obs, line) for line in output)
assert any(re.search(schema_cache_loaded_in_obs, line) for line in output)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

That does not validate of operations ordering.

Comment thread test/io/test_log.py
sleep_until_postgrest_config_reload()

# reload schema cache to verify that the config reload actually happened
postgrest.process.send_signal(signal.SIGUSR1)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Schema cache reloading also reloads configuration

Comment thread test/io/test_log.py
assert any(pool_flushed_obs in line for line in output)
assert any(re.search(schema_cache_queried_in_obs, line) for line in output)
assert any(re.search(schema_cache_loaded_obs, line) for line in output)
assert any(re.search(schema_cache_loaded_in_obs, line) for line in output)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Ditto (no ordering validation)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Related to tests

Development

Successfully merging this pull request may close these issues.

2 participants