Skip to content

Fix test_quotedReplyInThreadAndAlsoInChannel and test_doubleCheckmarkShown_whenMessageReadByParticipant flaky tests #6261

Merged
gpunto merged 6 commits intov7from
bug/fix_flakey_test
Mar 17, 2026
Merged

Fix test_quotedReplyInThreadAndAlsoInChannel and test_doubleCheckmarkShown_whenMessageReadByParticipant flaky tests #6261
gpunto merged 6 commits intov7from
bug/fix_flakey_test

Conversation

@VelikovPetar
Copy link
Copy Markdown
Contributor

@VelikovPetar VelikovPetar commented Mar 17, 2026

Goal

Describe why we are making this change

Implementation

Describe the implementation

🎨 UI Changes

Add relevant screenshots

Before After
img img

Add relevant videos

Before After

Testing

Explain how this change can be tested (or why it can't be tested)

Provide a patch below if it is necessary for testing

Provide the patch summary here
Provide the patch code here

☑️Contributor Checklist

General

  • I have signed the Stream CLA (required)
  • Assigned a person / code owner group (required)
  • Thread with the PR link started in a respective Slack channel (required internally)
  • PR targets the develop branch
  • PR is linked to the GitHub issue it resolves

Code & documentation

  • New code is covered by unit tests
  • Comparison screenshots added for visual changes
  • Affected documentation updated (KDocs, docusaurus, tutorial)

☑️Reviewer Checklist

  • UI Components sample runs & works
  • Compose sample runs & works
  • UI Changes correct (before & after images)
  • Bugs validated (bugfixes)
  • New feature tested and works
  • All code we touched has new or updated KDocs
  • Check the SDK Size Comparison table in the CI logs

🎉 GIF

Please provide a suitable gif that describes your work on this pull request

Summary by CodeRabbit

Release Notes

  • Tests
    • Enhanced test infrastructure with improved assertion chaining capabilities, enabling more concise and readable test expressions.
    • Improved test validation with explicit checkpoints to ensure proper resource loading before proceeding with assertions.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 17, 2026

PR checklist ✅

All required conditions are satisfied:

  • Title length is OK (or ignored by label).
  • At least one pr: label exists.
  • Sections ### Goal, ### Implementation, and ### Testing are filled.

🎉 Great job! This PR is ready for review.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 17, 2026

SDK Size Comparison 📏

SDK Before After Difference Status
stream-chat-android-client 5.25 MB 5.70 MB 0.45 MB 🟡
stream-chat-android-ui-components 10.60 MB 11.00 MB 0.41 MB 🟡
stream-chat-android-compose 12.81 MB 12.05 MB -0.77 MB 🚀

@VelikovPetar VelikovPetar changed the title Fix test_quotedReplyInThreadAndAlsoInChannel flakey test Fix test_quotedReplyInThreadAndAlsoInChannel and test_doubleCheckmarkShown_whenMessageReadByParticipant flaky tests Mar 17, 2026
@VelikovPetar VelikovPetar added pr:internal Internal changes / housekeeping pr:ignore-for-release Exclude from release notes and removed pr:internal Internal changes / housekeeping labels Mar 17, 2026
@VelikovPetar VelikovPetar marked this pull request as ready for review March 17, 2026 13:47
@VelikovPetar VelikovPetar requested a review from a team as a code owner March 17, 2026 13:47
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 17, 2026

Walkthrough

These changes introduce fluent API chaining patterns to test code by updating method signatures to return robot objects, enabling chained assertion calls for more readable and expressive test assertions.

Changes

Cohort / File(s) Summary
Fluent API Testing Pattern
stream-chat-android-compose-sample/src/androidTestE2eDebug/.../MessageDeliveryStatusTests.kt, stream-chat-android-compose-sample/src/androidTestE2eDebug/.../QuotedReplyTests.kt
Updated test code to enable fluent chaining by modifying method signatures to return robot objects, allowing assertions to be chained directly after message sends and login operations. Added comments indicating channel load awaiting.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 Fluent chains we now weave through our tests so fine,
Each assertion follows smoothly, in perfect line,
No waiting, no stuttering, just graceful flow,
Our testing robots dance—a delightful show!

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is a largely unfilled template with placeholder text. Critical sections like Goal, Implementation, and Testing contain only generic template instructions with no actual content filled in. Fill in the Goal section explaining why flaky tests need fixing, complete the Implementation section detailing the fluent chaining changes, and describe the testing approach for validating the fixes.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title directly references fixing two specific flaky tests and is clearly related to the code changes which modify test files with fluent chaining to improve test reliability.

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

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch bug/fix_flakey_test
📝 Coding Plan
  • Generate coding plan for human review comments

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.

Tip

CodeRabbit can enforce grammar and style rules using `languagetool`.

Configure the reviews.tools.languagetool setting to enable/disable rules and categories. Refer to the LanguageTool Community to learn more.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@stream-chat-android-compose-sample/src/androidTestE2eDebug/kotlin/io/getstream/chat/android/compose/tests/MessageDeliveryStatusTests.kt`:
- Around line 83-85: Update the inline comment next to the fluent chain using
userRobot.sendMessage(sampleText).assertMessageDeliveryStatus(MessageDeliveryStatus.SENT)
to correct the typo: change "senr" to "sent" so the comment reads that the call
awaits for the message to be successfully sent.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: cbebf106-276f-41f6-9f52-c5dc773ad096

📥 Commits

Reviewing files that changed from the base of the PR and between 9a9c4fb and 8bda4a4.

📒 Files selected for processing (2)
  • stream-chat-android-compose-sample/src/androidTestE2eDebug/kotlin/io/getstream/chat/android/compose/tests/MessageDeliveryStatusTests.kt
  • stream-chat-android-compose-sample/src/androidTestE2eDebug/kotlin/io/getstream/chat/android/compose/tests/QuotedReplyTests.kt

@andremion andremion added pr:ci CI changes pr:test Test-only changes labels Mar 17, 2026
@sonarqubecloud
Copy link
Copy Markdown

@gpunto gpunto merged commit e3aaaa5 into v7 Mar 17, 2026
15 checks passed
@gpunto gpunto deleted the bug/fix_flakey_test branch March 17, 2026 17:01
@stream-public-bot stream-public-bot added the released Included in a release label Mar 23, 2026
@stream-public-bot
Copy link
Copy Markdown
Contributor

🚀 Available in v7.0.0-beta

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

Labels

pr:ci CI changes pr:ignore-for-release Exclude from release notes pr:test Test-only changes released Included in a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants