Skip to content

test: stabilize storage settings reactivity emojis/sounds tests#39172

Queued
nazabucciarelli wants to merge 3 commits intodevelopfrom
fix/sounds-emojis-flaky-tests
Queued

test: stabilize storage settings reactivity emojis/sounds tests#39172
nazabucciarelli wants to merge 3 commits intodevelopfrom
fix/sounds-emojis-flaky-tests

Conversation

@nazabucciarelli
Copy link
Contributor

@nazabucciarelli nazabucciarelli commented Feb 27, 2026

Proposed changes (including videos or screenshots)

Apparently this test is flaky because watchMultiple has a debounce of 100ms and updateSetting has also a debounce of 100ms, which means that sometimes the storage doesn't have enough time to reinitialize. Suggested changes:

  • Avoid watchMultiple to be debounced when TEST_MODE=true, this will cause the updateSetting's debounce to have enough time to reinitialize the storage.
  • Regarrding the line moved upper from apps/meteor/tests/end-to-end/api/emoji-custom.ts and apps/meteor/tests/end-to-end/api/emoji-custom.ts, it's just a change to make tests faster and safer. Faster, because now the debounce parameter is false, as its following updateSetting manages the debounce. Safer, because in the case that FileSystemPath isn't empty (the default), the subsequent tests will fail.

Issue(s)

CORE-1894 Fix 'storage settings reactivity' tests flakiness from Custom Sounds/Emojis

Steps to test or reproduce

Further comments

For test purposes, verify that nothing breaks and the flakiness is gone, I've run the API Test (CE) job several times, and each of them succeeded.

Summary by CodeRabbit

Release Notes

  • Tests
    • Refined settings timing behavior in test environments.
    • Optimized test initialization for custom sounds and emoji functionality.

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Feb 27, 2026

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link

changeset-bot bot commented Feb 27, 2026

⚠️ No Changeset found

Latest commit: cfd7ebd

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 27, 2026

Walkthrough

The changes address test flakiness in storage settings reactivity tests by making debounce behavior in CachedSettings conditional on TEST_MODE (eliminating debounce during tests), and adjusting FileSystemPath setup timing in custom sounds and emoji end-to-end tests.

Changes

Cohort / File(s) Summary
Settings Debounce Logic
apps/meteor/app/settings/server/CachedSettings.ts
Introduces conditional debouncing in watchMultiple's mergeFunction: when TEST_MODE is 'true', callback invokes immediately without 100ms debounce; otherwise, debounced behavior is preserved.
Test Setup Timing
apps/meteor/tests/end-to-end/api/custom-sounds.ts, apps/meteor/tests/end-to-end/api/emoji-custom.ts
Moves FileSystemPath clearing to earlier in the before hook (before Storage_Type configuration) and removes duplicate in-block cleanup, altering the sequence of setup operations.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Suggested labels

type: chore

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR successfully addresses CORE-1894 by conditionally disabling watchMultiple debounce in test mode and adjusting test setup timing to resolve storage settings reactivity flakiness.
Out of Scope Changes check ✅ Passed All changes are directly scoped to fixing test flakiness: modifying watchMultiple debounce behavior for TEST_MODE and adjusting test setup timing in emoji/sounds test files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: stabilizing flaky storage settings reactivity tests for emojis and sounds by addressing debounce timing issues.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@nazabucciarelli nazabucciarelli added this to the 8.3.0 milestone Feb 27, 2026
@codecov
Copy link

codecov bot commented Feb 27, 2026

Codecov Report

❌ Patch coverage is 0% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.89%. Comparing base (5518503) to head (cfd7ebd).
⚠️ Report is 2 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #39172      +/-   ##
===========================================
+ Coverage    70.85%   70.89%   +0.04%     
===========================================
  Files         3208     3208              
  Lines       113426   113432       +6     
  Branches     20489    20579      +90     
===========================================
+ Hits         80363    80415      +52     
+ Misses       31012    30971      -41     
+ Partials      2051     2046       -5     
Flag Coverage Δ
e2e 60.38% <ø> (+0.02%) ⬆️
e2e-api 47.83% <ø> (-0.95%) ⬇️
unit 71.61% <0.00%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@ggazzo ggazzo left a comment

Choose a reason for hiding this comment

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

What do you think about removing debouncing in development/test_mode instead of increasing CI time?

@nazabucciarelli nazabucciarelli changed the title fix: add sleeps on storage settings reactivity flaky tests test: avoid watchMultiple debounce to be executed on TEST_MODE=true Mar 2, 2026
@nazabucciarelli nazabucciarelli changed the title test: avoid watchMultiple debounce to be executed on TEST_MODE=true test: stabilize storage settings reactivity emojis/sounds tests Mar 2, 2026
@nazabucciarelli nazabucciarelli marked this pull request as ready for review March 2, 2026 20:31
@nazabucciarelli nazabucciarelli requested a review from a team as a code owner March 2, 2026 20:31
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 3 files

@nazabucciarelli nazabucciarelli requested a review from ggazzo March 2, 2026 20:40
@nazabucciarelli nazabucciarelli changed the title test: stabilize storage settings reactivity emojis/sounds tests chore: stabilize storage settings reactivity emojis/sounds tests Mar 2, 2026
@ggazzo ggazzo changed the title chore: stabilize storage settings reactivity emojis/sounds tests test: stabilize storage settings reactivity emojis/sounds tests Mar 2, 2026
@ggazzo ggazzo added the stat: QA assured Means it has been tested and approved by a company insider label Mar 2, 2026
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Mar 2, 2026
@dionisio-bot dionisio-bot bot enabled auto-merge March 2, 2026 22:27
@dionisio-bot dionisio-bot bot added this pull request to the merge queue Mar 2, 2026
Any commits made after this event will not be merged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge type: chore

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants