-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
pgwire/pgtest: make the tests work both on pg and crdb #49641
Conversation
I wonder if it would be simpler (and feasible in the implementation) instead of have |
The datadriven engine does not support this yet unfortunately. Unless you have a suggestion to trick it into it? |
I see, I wasn't sure what the datadriven library could do. LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @knz, @otan, @rafiss, and @rohany)
pkg/sql/pgwire/testdata/pgtest/row_description, line 75 at r1 (raw file):
---- until ignore_table_oids
I disagree with adding this directive here -- this test was created to verify that the Table OIDs get populated. See #48417
I'm not sure what to do about the fact that the OIDs differ between CRDB and Postgres. But if I had to pick, then I think the test should be run with crdb_only
pkg/sql/pgwire/testdata/pgtest/row_description, line 171 at r1 (raw file):
# The following discrepancy is another bug. # See: https://github.com/cockroachdb/cockroach/issues/49640
covered by #49215 as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for filing the new issues, and for unifying these tests. Very much in favor, except for the changes to the row_description test.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @knz, @otan, @rafiss, and @rohany)
There was some accumulated incompatibilities in the test files. This patch fixes it, and in the process of doing so discovers two new bugs (cockroachdb#49639 and cockroachdb#49640). Summary of changes to the DSL: - the new `only` directive skips an entire test file if the db does not match (used for the crdb-specific portal bug test file) - the new flags `crdb_only` and `noncrdb_only` skip over a test directive if the db does not match. - the new flags `ignore_table_oids` and `ignore_type_oids` replace the corresponding OIDs in the RowDescription message by 0 prior to comparing with the expected value. Release note: None
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @otan, @rafiss, and @rohany)
pkg/sql/pgwire/testdata/pgtest/row_description, line 75 at r1 (raw file):
Previously, rafiss (Rafi Shamim) wrote…
I disagree with adding this directive here -- this test was created to verify that the Table OIDs get populated. See #48417
I'm not sure what to do about the fact that the OIDs differ between CRDB and Postgres. But if I had to pick, then I think the test should be run with crdb_only
Done.
pkg/sql/pgwire/testdata/pgtest/row_description, line 171 at r1 (raw file):
Previously, rafiss (Rafi Shamim) wrote…
covered by #49215 as well
Changed the ref.
friendly ping |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me!
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @otan, @rafiss, and @rohany)
thanks! bors r=rafiss,rohany |
Build succeeded |
There was some accumulated incompatibilities in the test files.
This patch fixes it, and in the process of doing so discovers
two new bugs (#49639 and #49640).
Summary of changes to the DSL:
the new
only
directive skips an entire test file if the dbdoes not match (used for the crdb-specific portal bug test file)
the new flags
crdb_only
andnoncrdb_only
skip over atest directive if the db does not match.
the new flags
ignore_table_oids
andignore_type_oids
replacethe corresponding OIDs in the RowDescription message by 0
prior to comparing with the expected value.
Release note: None