Skip to content

fix: avoid flaky test#3018

Open
rrayst wants to merge 1 commit into
masterfrom
fix-tests
Open

fix: avoid flaky test#3018
rrayst wants to merge 1 commit into
masterfrom
fix-tests

Conversation

@rrayst

@rrayst rrayst commented Jun 27, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Tests
    • Disabled one tutorial test that depends on an unstable external API, reducing noisy or flaky test runs.
    • Adjusted test import ordering with no functional impact.

@rrayst rrayst requested a review from predic8 June 27, 2026 05:39
@rrayst

rrayst commented Jun 27, 2026

Copy link
Copy Markdown
Member Author

/ok-to-test

@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The orchestration tutorial test class now has a class-level JUnit 5 @Disabled("Target API is unstable.") annotation. Its imports were adjusted to match the annotation change.

Changes

Orchestration tutorial test skip

Layer / File(s) Summary
Disable orchestration tutorial test
distribution/src/test/java/com/predic8/membrane/tutorials/orchestration/OrchestrationTutorialTest.java
A class-level @Disabled("Target API is unstable.") annotation is added, and the import section is updated accordingly.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

  • membrane/api-gateway#2421: Also disables tutorial tests with a class-level @Disabled("Target API is unstable.") annotation in the tutorials/*TutorialTest.java area.

Suggested reviewers

  • predic8

Poem

A bunny hopped by with a tiny grin,
“This tutorial test shall not begin!”
One little annotation, calm and neat,
Paws off for now—unstable API, retreat.
🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: disabling a flaky test to avoid unstable failures.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-tests

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
distribution/src/test/java/com/predic8/membrane/tutorials/orchestration/OrchestrationTutorialTest.java (1)

23-23: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy lift

Avoid permanently disabling the whole tutorial test class.

This fixes the flake, but it also removes all CI coverage for 30-Orchestration.yaml and the /books/{id} flow. Since the instability comes from the external openlibrary.org calls in distribution/tutorials/orchestration/30-Orchestration.yaml, prefer stubbing those backends or quarantining the test behind a dedicated integration profile instead of a blanket @Disabled.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@distribution/src/test/java/com/predic8/membrane/tutorials/orchestration/OrchestrationTutorialTest.java`
at line 23, Remove the blanket `@Disabled` from OrchestrationTutorialTest and
restore CI coverage for the tutorial flow; instead, isolate the unstable
openlibrary.org dependency used by 30-Orchestration.yaml by
stubbing/quarantining it or gating it behind a dedicated integration profile.
Update the test setup in OrchestrationTutorialTest so the /books/{id} path still
runs deterministically without disabling the entire class.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In
`@distribution/src/test/java/com/predic8/membrane/tutorials/orchestration/OrchestrationTutorialTest.java`:
- Line 23: Remove the blanket `@Disabled` from OrchestrationTutorialTest and
restore CI coverage for the tutorial flow; instead, isolate the unstable
openlibrary.org dependency used by 30-Orchestration.yaml by
stubbing/quarantining it or gating it behind a dedicated integration profile.
Update the test setup in OrchestrationTutorialTest so the /books/{id} path still
runs deterministically without disabling the entire class.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6cd4926a-1620-40dc-b383-4d7e9d34d1b7

📥 Commits

Reviewing files that changed from the base of the PR and between 14832e2 and 0a06654.

📒 Files selected for processing (1)
  • distribution/src/test/java/com/predic8/membrane/tutorials/orchestration/OrchestrationTutorialTest.java

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants