Skip to content

Conversation

@siyuniu-ms
Copy link
Contributor

@siyuniu-ms siyuniu-ms commented Jun 7, 2023

An update for #7650.
Thanks @laurit for bringing up the test problem at #8390.
The reason for rolling back is that turning snippet into snippet supplier would cost ineffieiency in writing as get snippet would be called multiple times when injecting. (The snippet config is designed to be unchangeable during the OTEL running after user has set the value. )

In order to solve the test problem, the setting of snippet would be done at build.gradle instead of during the test.
Also, the unit test would be run twice, one with the snippet, and the other without the snippet.

@siyuniu-ms siyuniu-ms marked this pull request as ready for review June 7, 2023 23:07
@siyuniu-ms siyuniu-ms requested a review from a team June 7, 2023 23:07
@siyuniu-ms siyuniu-ms marked this pull request as draft June 7, 2023 23:53
jvmArgs("-XX:+IgnoreUnrecognizedVMOptions")
}
val testSnippetInjection by registering(Test::class) {
jvmArgs("-Dotel.experimental.javascript-snippet=<script> Test </script>")
Copy link
Contributor

Choose a reason for hiding this comment

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

Running all tests twice, once without snippet injection and then with does not seem reasonable. Have you considered moving snippet tests to a separate class so they could be run independently or running the tests always with snippet injection enabled.

@siyuniu-ms
Copy link
Contributor Author

This pr needs further consideration.

@siyuniu-ms siyuniu-ms closed this Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants