Skip to content

DEV: cancel manager should bypass webmock #1350

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 20, 2025
Merged

DEV: cancel manager should bypass webmock #1350

merged 1 commit into from
May 20, 2025

Conversation

SamSaffron
Copy link
Member

Webmock can be a bit flaky under certain use cases.

Webmock can be a bit flaky under certain use cases.
@@ -3,6 +3,8 @@
describe DiscourseAi::Completions::CancelManager do
fab!(:model) { Fabricate(:anthropic_model, name: "test-model") }

before { WebMock.allow_net_connect! }
Copy link
Contributor

Choose a reason for hiding this comment

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

I’m not following this as it means that we are allowing outgoing http connections in the test environment. Not sure if I am missing something here.

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, read downwards, it creates a web server see the current flake, there is a bug in webmock somewhere where it defines local incorrectly.

@SamSaffron SamSaffron merged commit af18603 into main May 20, 2025
6 checks passed
@SamSaffron SamSaffron deleted the fix-flake branch May 20, 2025 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants