Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -220,4 +220,11 @@ public void injectTraceContext(java.util.Map<String, String> carrier) {
child.injectTraceContext(carrier);
}
}

@Override
public void requestUrlResolved(String requestUrl) {
for (ApiTracer child : children) {
child.requestUrlResolved(requestUrl);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -279,4 +279,11 @@ void testInjectTraceContext() {
inOrder.verify(child1).injectTraceContext(carrier);
inOrder.verify(child2).injectTraceContext(carrier);
}

@Test
void testRequestUrlResolved() {
compositeTracer.requestUrlResolved("the-url");
verify(child1).requestUrlResolved("the-url");
verify(child2).requestUrlResolved("the-url");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

For consistency with other tests in this class (such as testInjectTraceContext), it is recommended to use inOrder.verify() to ensure that the composite tracer delegates to its children in the expected order.

Suggested change
verify(child1).requestUrlResolved("the-url");
verify(child2).requestUrlResolved("the-url");
inOrder.verify(child1).requestUrlResolved("the-url");
inOrder.verify(child2).requestUrlResolved("the-url");

}
}
Loading