Skip to content

Conversation

@doorgan
Copy link
Collaborator

@doorgan doorgan commented Feb 10, 2026

There is a failing test on main, I think it's because we're using Patch on a test with async: true, while Patch is incompatible with async tests

1) test in_context?/2 can detect behaviours (Forge.Ast.EnvTest)
Error:      test/forge/ast/env_test.exs:181
     ** (UndefinedFunctionError) function Patch.Mock.Delegate.For.Forge.Ast.Parser.Spitfire.string_to_quoted/1 is undefined (module Patch.Mock.Delegate.For.Forge.Ast.Parser.Spitfire is not available)
     code: env = new_env("@behaviour Modul|e")
     stacktrace:
       Patch.Mock.Delegate.For.Forge.Ast.Parser.Spitfire.string_to_quoted("@behaviour Module")
       (forge 0.1.0) lib/forge/ast.ex:173: Forge.Ast.from/1
       (forge 0.1.0) lib/forge/ast.ex:123: Forge.Ast.analyze/1
       test/forge/ast/env_test.exs:14: Forge.Ast.EnvTest.new_env/2
       test/forge/ast/env_test.exs:182: (test)

Copy link
Contributor

@katafrakt katafrakt left a comment

Choose a reason for hiding this comment

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

The PR title is a bit off (Path -> Patch, true -> false), but I agree this is very likely a reason for flakiness.

@mhanberg
Copy link
Member

He must think it's Opposite Day.

@doorgan doorgan changed the title test: make test using Path be async: true test: make test using Patch be async: false Feb 10, 2026
@doorgan
Copy link
Collaborator Author

doorgan commented Feb 10, 2026

Lol, remind me to not push a pr before going to bed

@mhanberg mhanberg changed the title test: make test using Patch be async: false test: set test using Patch to be async: false Feb 10, 2026
@mhanberg mhanberg merged commit b61c102 into main Feb 10, 2026
73 of 74 checks passed
@mhanberg mhanberg deleted the doorgan/patch-test-async branch February 10, 2026 13:49
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.

3 participants