Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a general shared variable to communicate DB internal state to SQL for tests #133

Closed
Ngalstyan4 opened this issue Sep 10, 2023 · 0 comments
Labels
core Core Database good first issue Good for newcomers

Comments

@Ngalstyan4
Copy link
Contributor

We want to make sure our regression tests cover different scenarios in which a feature can be used.
These different scenarios do not always have SQL-visible output. For these cases we currently rely on adding elog(DEBUG5,..) statements and make sure those elogs are only enabled for the test under question.

See PRs #78 and #103 For more details on how this kind of testing works. In #78, for example, with this kinds of elogs we make sure that for different values of init_k usearch_search is triggered expected number of times.

This has downsides

  • elogs have performance impact even if their output is not logged anywhere.
  • Postgres itself prints logs at the enabled level which at various points result in sporadic, unrelated, benign regressions

It would be better to add a special variable on an internal schema `(e.g. _lanterndb_internal.state_for_tests) that can be used to comminicate data to our regression tests. In tests where we want to enable this kind of communication we would set the variable and print it from the regression test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core Database good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant