Skip to content

Rewrite notifications tests#59414

Merged
zmb3 merged 2 commits intomasterfrom
zmb3/test-notifications
Sep 26, 2025
Merged

Rewrite notifications tests#59414
zmb3 merged 2 commits intomasterfrom
zmb3/test-notifications

Conversation

@zmb3
Copy link
Copy Markdown
Collaborator

@zmb3 zmb3 commented Sep 21, 2025

TestNotifications has been flaky, and I suspect part of it is due to the way we handle time. Notifications use UUIDv7, which include a timestamp, so our tests were mixing a fake clock and a real clock.

This commit tests notifications using synctest without a fake clock in sight.

Additionally, TestNotifications was testing too many things (pagination, matching, RBAC, state mutation, etc). This commit breaks the test up into several more-focused tests.

Updates #58392

@zmb3 zmb3 requested a review from rudream September 21, 2025 22:28
@zmb3 zmb3 added the no-changelog Indicates that a PR does not require a changelog entry label Sep 21, 2025
@public-teleport-github-review-bot public-teleport-github-review-bot bot removed the request for review from kiosion September 25, 2025 08:53
TestNotifications has been flaky, and I suspect part of it is due
to the way we handle time. Notifications use UUIDv7, which include
a timestamp, so our tests were mixing a fake clock and a real clock.

This commit tests notifications using synctest without a fake clock
in sight.

Additionally, TestNotifications was testing too many things (pagination,
matching, RBAC, state mutation, etc). This commit breaks the test up
into several more-focused tests.

Updates #58392
@zmb3 zmb3 force-pushed the zmb3/test-notifications branch from 94a4105 to ef09b50 Compare September 25, 2025 14:36
@zmb3 zmb3 added this pull request to the merge queue Sep 26, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 26, 2025
@zmb3 zmb3 added this pull request to the merge queue Sep 26, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 26, 2025
@zmb3 zmb3 enabled auto-merge September 26, 2025 20:56
@zmb3 zmb3 added this pull request to the merge queue Sep 26, 2025
Merged via the queue into master with commit 0ccbcfd Sep 26, 2025
40 checks passed
@zmb3 zmb3 deleted the zmb3/test-notifications branch September 26, 2025 21:39
@backport-bot-workflows
Copy link
Copy Markdown
Contributor

@zmb3 See the table below for backport results.

Branch Result
branch/v16 Failed
branch/v17 Create PR
branch/v18 Create PR

rhammonds-teleport pushed a commit that referenced this pull request Nov 6, 2025
TestNotifications has been flaky, and I suspect part of it is due
to the way we handle time. Notifications use UUIDv7, which include
a timestamp, so our tests were mixing a fake clock and a real clock.

This commit tests notifications using synctest without a fake clock
in sight.

Additionally, TestNotifications was testing too many things (pagination,
matching, RBAC, state mutation, etc). This commit breaks the test up
into several more-focused tests.

Updates #58392
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/branch/v17 backport/branch/v18 no-changelog Indicates that a PR does not require a changelog entry size/sm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants