Skip to content

RTC: Fix compaction unit test#77986

Merged
ramonjd merged 2 commits intotrunkfrom
fix/rtc-compaction-unit-test
May 6, 2026
Merged

RTC: Fix compaction unit test#77986
ramonjd merged 2 commits intotrunkfrom
fix/rtc-compaction-unit-test

Conversation

@alecgeatches
Copy link
Copy Markdown
Contributor

@alecgeatches alecgeatches commented May 5, 2026

What?

This PR is part of a couple related PRs for fixing a sync issue in RTC:

We should be able to merge the Gutenberg PR, but because core replaces the WP_HTTP_Polling_Sync_Server class, the changes in that PR won't actually be running in tests. Once the backport merges, it will, and then the test_sync_stale_compaction_succeeds_when_newer_compaction_exists() test will start failing.

Note that the fixed unit test in this PR is expected to fail until the backport is merged.

Why?

So we can fix failing unit tests once the backport PR is merged.

How?

This PR updates the unit test test_sync_stale_compaction_succeeds_when_newer_compaction_exists() to match the new server-side logic which allows multiple compaction results to be processed.

Testing Instructions

  1. See CI tests pass (after Backport compaction processing fix that can cause user YDocs to diverge wordpress-develop#11716 is merged)
  2. Rejoice!

Tests can also be run locally via:

 npm run test:unit:php:base -- --filter test_sync_stale_compaction_is_stored_as_update_when_newer_compaction_exists phpunit/tests/collaboration/wpHttpPollingSyncServer.php

@alecgeatches alecgeatches requested a review from maxschmeling May 5, 2026 20:06
@alecgeatches alecgeatches self-assigned this May 5, 2026
@alecgeatches alecgeatches added [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. [Feature] Real-time Collaboration Phase 3 of the Gutenberg roadmap around real-time collaboration labels May 5, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: alecgeatches <alecgeatches@git.wordpress.org>
Co-authored-by: maxschmeling <maxschmeling@git.wordpress.org>
Co-authored-by: ramonjd <ramonopoly@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

Flaky tests detected in 363decc.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/25413058813
📝 Reported issues:

@ramonjd
Copy link
Copy Markdown
Member

ramonjd commented May 6, 2026

I just rebased this PR - if things pass I'll merge it today since the CI is blocked for others. Cheers!

@ramonjd ramonjd enabled auto-merge (squash) May 6, 2026 02:38
@ramonjd ramonjd merged commit 64575b4 into trunk May 6, 2026
40 of 41 checks passed
@ramonjd ramonjd deleted the fix/rtc-compaction-unit-test branch May 6, 2026 03:54
@github-actions github-actions Bot added this to the Gutenberg 23.2 milestone May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Real-time Collaboration Phase 3 of the Gutenberg roadmap around real-time collaboration [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants