You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I was working on #8452 and I ran into a problem where fixing the linter errors broke the tests.
It seems that these two tests are not correct, and are only passing because the variables are being captured incorrectly, so they all end up running the same test.
To Reproduce
I saw that the variables were not being captured properly, so I tried to fix it:
engine_test.go:2373:
Error Trace: loki/pkg/logql/engine_test.go:2373
Error: Not equal:
expected: *errors.errorString(&errors.errorString{s:"mock error"})
actual : <nil>(<nil>)
Test: TestStepEvaluator_Error/stream
--- FAIL: TestStepEvaluator_Error/stream (0.00s)
So the thing is, I have tried to understand what these tests are doing, but I do not understand any of them, so IDK if someone wants to look at these tests to see if it's fixable, or to remove the broken tests.
The text was updated successfully, but these errors were encountered:
Hey thank you for your report ❤️
I recently fixed them in the main branch so I'm closing this one. And yeah, they were bugged 😅 (variable shadowing+parallel execution).
Describe the bug
I was working on #8452 and I ran into a problem where fixing the linter errors broke the tests.
It seems that these two tests are not correct, and are only passing because the variables are being captured incorrectly, so they all end up running the same test.
To Reproduce
I saw that the variables were not being captured properly, so I tried to fix it:
But then some of the tests start to fail:
Going back to the original code, if I check the pointer value of the captured test case:
You can see the memory address for all the captured functions is the same, so they are all running the same test:
This is also the case for the test:
So the thing is, I have tried to understand what these tests are doing, but I do not understand any of them, so IDK if someone wants to look at these tests to see if it's fixable, or to remove the broken tests.
The text was updated successfully, but these errors were encountered: