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

Disable xids and empty transactions in TAP test #7264

Merged
merged 1 commit into from
Sep 19, 2024

Conversation

mkindahl
Copy link
Contributor

@mkindahl mkindahl commented Sep 11, 2024

Instead of filtering the output of pg_logical_slot_get_changes we set
the option skip-empty-xacts and clear include-xids to get stable
tests.

Since the option 'skip-empty-xacts' is set, this changes the order of
messages since the BEGIN of a transaction is not generated until the
decoder plugin can see that the transaction started and messages do not
count as part of a transaction.

We also remove transaction start and end marker (and strip trailing and
leading whitespace) since these will appear in different places
depending on the PostgreSQL version and they are not important for the
correctness of the test.

Disable-check: force-changelog-file

@erimatnor erimatnor self-requested a review September 11, 2024 14:34
Copy link

codecov bot commented Sep 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.30%. Comparing base (59f50f2) to head (be407c5).
Report is 347 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #7264       +/-   ##
===========================================
+ Coverage   80.06%   92.30%   +12.23%     
===========================================
  Files         190      205       +15     
  Lines       37181    38433     +1252     
  Branches     9450     9962      +512     
===========================================
+ Hits        29770    35476     +5706     
+ Misses       2997     2957       -40     
+ Partials     4414        0     -4414     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Instead of filtering the output of `pg_logical_slot_get_changes` we set
the option `skip-empty-xacts` and clear `include-xids` to get stable
tests.

Since the option 'skip-empty-xacts' is set, this changes the order of
messages since the BEGIN of a transaction is not generated until the
decoder plugin can see that the transaction started and messages do not
count as part of a transaction.

We also remove transaction start and end marker (and strip trailing and
leading whitespace) since these will appear in different places
depending on the PostgreSQL version and they are not important for the
correctness of the test.
@mkindahl mkindahl enabled auto-merge (rebase) September 18, 2024 20:40
@mkindahl mkindahl merged commit 5cd23f9 into timescale:main Sep 19, 2024
40 checks passed
@mkindahl mkindahl deleted the fix-logrepl-test branch September 19, 2024 08:06
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