Skip to content
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

Move testTracer struct in tracingtest package and reuse it #3322

Merged
merged 4 commits into from
Dec 5, 2024

Conversation

RomanZavodskikh
Copy link
Contributor

This pull requests is split from #3318 to refactor change of testTracer to make it more reusable.

Roman Zavodskikh added 2 commits November 25, 2024 13:36
@RomanZavodskikh RomanZavodskikh added the minor no risk changes, for example new filters label Nov 25, 2024
filters/scheduler/fifo_test.go Show resolved Hide resolved
tracing/tracingtest/mocktracer.go Outdated Show resolved Hide resolved
filters/scheduler/lifo_test.go Outdated Show resolved Hide resolved
@AlexanderYastrebov
Copy link
Member

👍

@RomanZavodskikh
Copy link
Contributor Author

👍

@MustafaSaber MustafaSaber merged commit 93abbf4 into master Dec 5, 2024
11 of 13 checks passed
@MustafaSaber MustafaSaber deleted the refactorMockTracer branch December 5, 2024 09:23
AlexanderYastrebov added a commit that referenced this pull request Jan 14, 2025
Deprecate hand-rolled test tracer implementation in favour of
MockTracer added by #3322 that wraps github.com/opentracing/opentracing-go/mocktracer
and waits for finished spans.

Follow up on #684, see #684 (comment)

Closes #2084
Updates #2104

Signed-off-by: Alexander Yastrebov <[email protected]>
AlexanderYastrebov added a commit that referenced this pull request Jan 14, 2025
Deprecate hand-rolled test tracer implementation in favour of
MockTracer added by #3322 that wraps github.com/opentracing/opentracing-go/mocktracer
and waits for finished spans.

Follow up on #684, see #684 (comment)

Closes #2084
Updates #2104

Signed-off-by: Alexander Yastrebov <[email protected]>
AlexanderYastrebov added a commit that referenced this pull request Jan 14, 2025
Deprecate hand-rolled test tracer implementation in favour of
MockTracer added by #3322 that wraps github.com/opentracing/opentracing-go/mocktracer
and waits for finished spans.

Follow up on #684, see #684 (comment)

Closes #2084
Updates #2104

Signed-off-by: Alexander Yastrebov <[email protected]>
AlexanderYastrebov added a commit that referenced this pull request Jan 14, 2025
Follow up on #684 (#684 (comment)) and
deprecate hand-rolled test tracer implementation in favour of
MockTracer added by #3322 that wraps github.com/opentracing/opentracing-go/mocktracer
and waits for finished spans.

Fix MockTracer to return MockSpan that has proper Tracer() implementation.

Closes #2084
Updates #2104

Signed-off-by: Alexander Yastrebov <[email protected]>
AlexanderYastrebov added a commit that referenced this pull request Jan 14, 2025
Follow up on #684 (#684 (comment)) and
deprecate hand-rolled test tracer implementation in favour of
MockTracer added by #3322 that wraps github.com/opentracing/opentracing-go/mocktracer
and waits for finished spans.

Fix MockTracer to return MockSpan that has proper Tracer() implementation and
panic on timeout waiting for finished spans.

Closes #2084
Updates #2104

Signed-off-by: Alexander Yastrebov <[email protected]>
AlexanderYastrebov added a commit that referenced this pull request Jan 14, 2025
Follow up on #684 (#684 (comment)) and
deprecate hand-rolled test tracer implementation in favour of
MockTracer added by #3322 that wraps github.com/opentracing/opentracing-go/mocktracer
and waits for finished spans.

Fix MockTracer:
* return MockSpan that has proper Tracer() implementation
* return MockSpan wrappers from FinishedSpans
* panic on timeout waiting for finished spans

Closes #2084
Updates #2104

Signed-off-by: Alexander Yastrebov <[email protected]>
@AlexanderYastrebov
Copy link
Member

This implementation is not correct - it returns spans whose Tracer() method returns ot.MockTracer and not Skipper's MockTracer.

I am looking whether we can fix that within #3375

AlexanderYastrebov added a commit that referenced this pull request Jan 14, 2025
Follow up on #684 (#684 (comment)) and
deprecate hand-rolled test tracer implementation in favour of
MockTracer added by #3322 that wraps github.com/opentracing/opentracing-go/mocktracer
and waits for finished spans.

Fix MockTracer:
* return MockSpan that has proper Tracer() implementation
* return MockSpan wrappers from FinishedSpans
* panic on timeout waiting for finished spans

Closes #2084
Updates #2104

Signed-off-by: Alexander Yastrebov <[email protected]>
AlexanderYastrebov added a commit that referenced this pull request Jan 14, 2025
Follow up on #684 (#684 (comment)) and
deprecate hand-rolled test tracer implementation in favour of
MockTracer added by #3322 that wraps github.com/opentracing/opentracing-go/mocktracer
and waits for finished spans.

Fix MockTracer:
* return MockSpan that has proper Tracer() implementation
* return MockSpan wrappers from FinishedSpans
* panic on timeout waiting for finished spans

Closes #2084
Updates #2104

Signed-off-by: Alexander Yastrebov <[email protected]>
AlexanderYastrebov added a commit that referenced this pull request Jan 15, 2025
Follow up on #684 (#684 (comment)) and
deprecate hand-rolled test tracer implementation in favour of
MockTracer added by #3322 that wraps github.com/opentracing/opentracing-go/mocktracer
and waits for finished spans.

Fix MockTracer:
* return MockSpan that has proper Tracer() implementation
* return MockSpan wrappers from FinishedSpans
* panic on timeout waiting for finished spans

Closes #2084
Updates #2104

Signed-off-by: Alexander Yastrebov <[email protected]>
AlexanderYastrebov added a commit that referenced this pull request Jan 15, 2025
Follow up on #684 (#684 (comment)) and
deprecate hand-rolled test tracer implementation in favour of
MockTracer added by #3322 that wraps github.com/opentracing/opentracing-go/mocktracer
and waits for finished spans.

Fix MockTracer:
* return MockSpan that has proper Tracer() implementation
* return MockSpan wrappers from FinishedSpans
* panic on timeout waiting for finished spans

Closes #2084
Updates #2104

Signed-off-by: Alexander Yastrebov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor no risk changes, for example new filters
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants