Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

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.
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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants