dym: make metrics ID inner field public for test/debug#44115
Conversation
Signed-off-by: Takeshi Yoneda <tyoneda@netflix.com>
|
Before this change the metric ID values could usefully be used as witness types, so if a A pattern I've seen before for this is to have a supertrait that provide associated types for IDs like this. The production type that implements the trait and supertrait would use its real ID types and the test type that implements the trait would provide its own test-only ID types that are easier to construct. |
|
@akonradi how about providing a constructor only available in #[cfg(test)]? |
|
That won't work either, unfortunately. |
) Commit Message: dym: make metrics ID inner field publish for test/debug Additional Description: Otherwise, we cannot mock the logic with the metrics ID without using transmute unsage stuff Risk Level: n/a Testing: n/a Docs Changes: n/a Release Notes: n/a Platform Specific Features: n/a Signed-off-by: Takeshi Yoneda <tyoneda@netflix.com> Signed-off-by: Xuyang Tao <taoxuy@google.com>
) Commit Message: dym: make metrics ID inner field publish for test/debug Additional Description: Otherwise, we cannot mock the logic with the metrics ID without using transmute unsage stuff Risk Level: n/a Testing: n/a Docs Changes: n/a Release Notes: n/a Platform Specific Features: n/a Signed-off-by: Takeshi Yoneda <tyoneda@netflix.com> Signed-off-by: Jonathan Wu <jtwu@google.com>
) Commit Message: dym: make metrics ID inner field publish for test/debug Additional Description: Otherwise, we cannot mock the logic with the metrics ID without using transmute unsage stuff Risk Level: n/a Testing: n/a Docs Changes: n/a Release Notes: n/a Platform Specific Features: n/a Signed-off-by: Takeshi Yoneda <tyoneda@netflix.com> Signed-off-by: Nick Shipilov <nick.shipilov.n@gmail.com>
) Commit Message: dym: make metrics ID inner field publish for test/debug Additional Description: Otherwise, we cannot mock the logic with the metrics ID without using transmute unsage stuff Risk Level: n/a Testing: n/a Docs Changes: n/a Release Notes: n/a Platform Specific Features: n/a Signed-off-by: Takeshi Yoneda <tyoneda@netflix.com>
Commit Message: dym: make metrics ID inner field publish for test/debug
Additional Description:
Otherwise, we cannot mock the logic with the metrics ID without using transmute unsage stuff
Risk Level: n/a
Testing: n/a
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: n/a