Flc゛
80cb909774
refactor: replace context.Background() with t.Context()/b.Context() in tests ( #7352 )
...
Based on the Go version we currently use, the dependency already
supports 1.24+, which allows using `t.Context()` and `b.Context()` in
unit tests and benchmarks respectively.
- Enable `context-background` and `context-todo` in
[`usetesting`](https://golangci-lint.run/docs/linters/configuration/#usetesting )
- Adjust the code to support linter detection
---------
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com >
Co-authored-by: Tyler Yahn <codingalias@gmail.com >
Co-authored-by: Damien Mathieu <42@dmathieu.com >
2025-09-23 09:52:45 +02:00
Flc゛
814a41388b
feat(trace): add concurrent-safe Reset method to SpanRecorder ( #5994 )
...
Add Reset method to reuse it for testing. Just like in InMemoryExporter.
2024-11-25 21:20:46 +01:00
Matthieu MOREL
063239fa37
[chore]: enable len and empty rules from testifylint ( #5832 )
...
#### Description
Testifylint is a linter that provides best practices with the use of
testify.
This PR enables
[empty](https://github.com/Antonboom/testifylint?tab=readme-ov-file#empty )
and
[len](https://github.com/Antonboom/testifylint?tab=readme-ov-file#len )
rules from [testifylint](https://github.com/Antonboom/testifylint )
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com >
2024-09-21 08:04:28 -07:00
Robert Pająk
7dea232a46
[chore] Simplify the license header ( #4987 )
2024-02-29 07:05:28 +01:00
Robert Pająk
fd5284f75c
styleguide: tests goroutine leaks and naming ( #4348 )
...
* internal/global: Fix goroutine leaks in tests
2023-07-24 09:35:06 +02:00
Tyler Yahn
a8bb0bf89f
Make the tracetest.SpanRecorder concurrent safe ( #2178 )
...
* Make the tracetest.SpanRecorder concurrent safe
The otelgrpc instrumentation in the contrib repository needs a
concurrent safe implementation as the stream testing is done in a
separate goroutine.
* Refactor concurrency tests
2021-08-12 09:12:31 -07:00
Tyler Yahn
11f62640ee
Add a SpanRecorder to the sdk/trace/tracetest ( #2132 )
...
* Add a SpanRecorder to the sdk/trace/tracetest
* Add changes to changelog
* Run make precommit
* Rename tests
2021-07-29 10:00:58 -07:00