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

Improve and document test suites #404

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

dutow
Copy link
Contributor

@dutow dutow commented Jul 6, 2023

This commit improves the 007 prove test: PG oredering is either case sensitive or case insensitive depending on system settings. The testcase uses ordering based on the query string, with some uppercase and some lowercase queries, causing resulting in different outputs on different systems. This change modifies the ordering to use lower(query) to ensure consistent results everywhere.

It also adds a TESTING markdown file describing how to run the test suite when building pg ang pgsm from source.

@dutow dutow requested a review from Naeem-Akhter July 6, 2023 10:08
@dutow dutow force-pushed the test_imrpov branch 4 times, most recently from 7bf0a63 to 5e68f83 Compare July 10, 2023 06:10
This commit improves the 007 prove test: PG oredering is either case sensitive or case insensitive depending on system settings.
The testcase uses ordering based on the query string, with some uppercase and some lowercase queries, causing resulting in different outputs on different systems.
This change modifies the ordering to use lower(query) to ensure consistent results everywhere.

It also adds a TESTING markdown file describing how to run the test suite when building pg ang pgsm from source.
Copy link
Contributor

@Naeem-Akhter Naeem-Akhter left a comment

Choose a reason for hiding this comment

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

With these changes said test case is failing on PGDG 12,13,14. It needs to addressed on these PGDG versions.

First for making one expected file following code needs to be commented or removed in pgsm.pm.

if ($PG_MAJOR_VERSION >= 15 and "$filename_without_extension" == "007_settings_pgsm_query_shared_buffer")
{
$expected_filename = "${expected_filename}.${PG_MAJOR_VERSION}";
}

Then keep one expected output file instead of following two:
t/expected/007_settings_pgsm_query_shared_buffer.out
t/expected/007_settings_pgsm_query_shared_buffer.out.15

After doing above changes you will get the following diff on PGDG 14,13,12.
example | copy pgbench_accounts from stdin with (freeze on)
example | copy pgbench_accounts from stdin

Even if you disable utility statements in t/007_settings_pgsm_query_shared_buffer.pl with following addition, you will still some diff on PGDG 12,13.

print $conf "pg_stat_monitor.pgsm_track_utility = 'off'\n";

So, I suspect it will require more investigation and settings changes where test case doesn't fail on any of PPG 11 ~ 15, PGDG 11 ~ 15 and code-coverage workflows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants