[
https://issues.apache.org/jira/browse/HTRACE-363?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15295801#comment-15295801
]
Colin Patrick McCabe commented on HTRACE-363:
---------------------------------------------
I agree that there is an implicit order based on how the code is implemented
now. However, we shouldn't rely on that, since it could change in the future.
bq. At least in this case, there is a order which ID s of parents get assigned.
Also note the one parent ID is randomly generated. How do I handle this by
sorting for guaranteed order between parents?
One way would be to put the SpanId objects into a HashMap, and verify that the
map contains the IDs you expect.
> Add tests for newScope with parent id
> -------------------------------------
>
> Key: HTRACE-363
> URL: https://issues.apache.org/jira/browse/HTRACE-363
> Project: HTrace
> Issue Type: Test
> Components: core
> Reporter: Mike Drob
>
> We should add some tests to verify that when there is a currently active
> scope and `newScope` is called with a valid parent id that both are included
> in the child span. The current code does this correctly, I think, but we
> should have tests to prevent accidental regressions in the future.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)