[tests-only][full-ci] test: fix flaky grouped email notification - #12882
Open
anon-pradip wants to merge 8 commits into
Open
anon-pradip wants to merge 8 commits into
anon-pradip wants to merge 8 commits into
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
2 of 9 tasks
anon-pradip
force-pushed
the
test/fix-email-flaky
branch
9 times, most recently
from
September 11, 2026 05:20
2e363b6 to
a7407c1
Compare
anon-pradip
marked this pull request as ready for review
September 11, 2026 05:45
PrajwolAmatya
requested review from
Ashim-Stha,
ishabaral,
kavitagautam and
saw-jan
September 11, 2026 05:49
saw-jan
reviewed
Sep 11, 2026
anon-pradip
force-pushed
the
test/fix-email-flaky
branch
from
September 22, 2026 12:33
a7407c1 to
381cea5
Compare
anon-pradip
force-pushed
the
test/fix-email-flaky
branch
from
September 23, 2026 07:12
77983ff to
4b9278f
Compare
saw-jan
reviewed
Sep 23, 2026
saw-jan
reviewed
Sep 23, 2026
anon-pradip
force-pushed
the
test/fix-email-flaky
branch
from
September 28, 2026 04:07
4b9278f to
4d0ffa5
Compare
saw-jan
reviewed
Sep 30, 2026
saw-jan
reviewed
Sep 30, 2026
saw-jan
reviewed
Sep 30, 2026
saw-jan
reviewed
Sep 30, 2026
saw-jan
reviewed
Sep 30, 2026
anon-pradip
force-pushed
the
test/fix-email-flaky
branch
from
September 30, 2026 11:38
4d0ffa5 to
bdd1624
Compare
anon-pradip
force-pushed
the
test/fix-email-flaky
branch
from
September 30, 2026 11:39
bdd1624 to
c69633d
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes two unrelated causes of failure in the grouped email notification tests (
cliCommandssuite).1. Timezone (local only). The test built the expected expiry in UTC, but oCIS prints it in the server's timezone, so on a non-UTC host they never matched:
oCIS emailed "... expired at 2026-09-03 05:45:00" <- server timezone (+05:45)
test expected "... expired at 2026-09-03 00:00:00" <- UTC
The email body has no offset, so it can't be converted. Instead the expected value is rendered in the timezone from the mail's own
Dateheader, which comes from the same message being asserted.EmailContext.php- reads the mail'sDatetimezone and resolves%expiry_date_in_mail%after the mail is fetched.FeatureContext.php- expiry is aDateTimeImmutablein UTC;%expiry_date_in_mail%is removed from the global substitutions.SpacesContext.php- expiration dates from the Graph API are converted to UTC before taking the date, instead of slicing the server's local date.bootstrap.php- pins PHP to UTC so every workspace behaves the same regardless of itsphp.ini.2. Flakiness (CI). oCIS only evaluates expirations when a resource is accessed (#10966, #11690). The scenario never read the space after expiring the membership, so
SpaceMembershipExpiredwas only published if an unrelated async handler happened to.emailNotification.featurenow assertsthe user "Brian" should not have a space called "New-Space", which forces the check and verifies the membership ended.Related Issue
Motivation and Context
emailNotification.featurewas flaky in CI and always failed locally on non-UTC machines.How Has This Been Tested?
Types of changes
Checklist: