Skip to content

Conversation

@jaydeluca
Copy link
Member

@jaydeluca jaydeluca commented Dec 17, 2025

Part of #14906

Addresses: #14906 (comment)

@github-actions github-actions bot added the test native This label can be applied to PRs to trigger them to run native tests label Dec 17, 2025
@jaydeluca jaydeluca marked this pull request as ready for review December 17, 2025 20:53
@jaydeluca jaydeluca requested a review from a team as a code owner December 17, 2025 20:53

@Test
void restClientBuilder() {
testing.clearAllExportedData();
Copy link
Contributor

Choose a reason for hiding this comment

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

why do you need to call clearAllExportedData here? In tests that use our InstrumentationExtension this gets automatically called before each test. If these smoke tests don't use it then perhaps it could be called from a @BeforeEach method so it wouldn't need to be called in each tests.

Copy link
Member Author

Choose a reason for hiding this comment

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

one of the tests is asserting the telemetry emitted during the test setup, so BeforeEach couldn't be used, but AfterEach does

.mutate()
.requestInterceptors(
interceptors -> {
if (interceptors.stream()
Copy link
Contributor

Choose a reason for hiding this comment

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

perhaps we should use something like in #15546 to avoid rebuilding the client when interceptor wasn't added?

Copy link
Member Author

Choose a reason for hiding this comment

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

updated. depending on which PR is merged first, we can move the test to the AbstractRestClientInstrumentationAutoConfigurationTest class in the second one


testImplementation("org.springframework:spring-test:7.0.2")
testImplementation("org.springframework.boot:spring-boot-resttestclient")
testImplementation("org.springframework.boot:spring-boot-restclient")
Copy link
Member Author

Choose a reason for hiding this comment

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

this is unrelated to the other changes, they released 4.0.1 yesterday which broke stuff. See spring-projects/spring-boot#48253

// classes in test setup require 5.0+
testLibrary("org.springframework.cloud:spring-cloud-starter-gateway-server-webflux:5.0.0")
testLibrary("org.springframework.boot:spring-boot-starter-test:4.0.0")
testLibrary("org.springframework.boot:spring-boot-webflux")
Copy link
Member Author

Choose a reason for hiding this comment

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

@trask trask merged commit 20f4036 into open-telemetry:main Dec 19, 2025
87 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test native This label can be applied to PRs to trigger them to run native tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants