Skip to content

Fix test timeouts by using a local URL for export tasks#474

Draft
Strift wants to merge 5 commits intomainfrom
fix-tests
Draft

Fix test timeouts by using a local URL for export tasks#474
Strift wants to merge 5 commits intomainfrom
fix-tests

Conversation

@Strift
Copy link
Contributor

@Strift Strift commented Mar 12, 2026

Pull Request

Related issue

The export API tests introduced in PR #462 (merged on Feb 3rd) introduced errors in the tests. Specifically, test/export_test.dart and test/code_samples.dart were using https://example.com and new_instance_url as the destination URLs for the export task:

final result = await client.export(ExportQuery(
  url: 'https://example.com',
));

Why it caused timeouts

Because the HTTP request to https://example.com hangs indefinitely, the entire Meilisearch task queue gets blocked (tasks are processed sequentially). Since all tests share the same Meilisearch instance, any subsequent test that calls .waitFor(client: client) ends up waiting forever for its task to be processed, eventually throwing a TimeoutException after 30 seconds.

What does this PR do?

  • Change the export URL in both test/export_test.dart and test/code_samples.dart to http://127.0.0.1:7700/health.

AI Disclosure

Made-with: Cursor and gemini-3.1-pro-preview

PR checklist

Please check if your PR fulfills the following requirements:

  • Did you use any AI tool while implementing this PR (code, tests, docs, etc.)? If yes, disclose it in the PR description and describe what it was used for. AI usage is allowed when it is disclosed.
  • Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
  • Have you read the contributing guidelines?
  • Have you made sure that the title is accurate and descriptive of the changes?

Thank you so much for contributing to Meilisearch!

@coderabbitai
Copy link

coderabbitai bot commented Mar 12, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d46f3f1e-1db0-48a0-8da2-76cf99995df3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • 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 and usage tips.

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.

1 participant