Skip to content

Improve perf of current network tests#1084

Merged
breedx-splk merged 1 commit into
open-telemetry:mainfrom
bidetofevil:network-test-perf
Jul 25, 2025
Merged

Improve perf of current network tests#1084
breedx-splk merged 1 commit into
open-telemetry:mainfrom
bidetofevil:network-test-perf

Conversation

@bidetofevil

Copy link
Copy Markdown
Contributor

This test was running a lot of redundant API versions, which all has a fixed cost to spin up for the first time it was also unnecessarily reinitializing a lot of mocks that aren't inspected.

This PR curates a set of API versions that are relevant (i.e. code contains checks that differentiate behavior), as well as clean up some of the redundancies that are impactful.

@bidetofevil bidetofevil requested a review from a team as a code owner July 22, 2025 18:16

@breedx-splk breedx-splk left a comment

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.

LGTM thanks!

@LikeTheSalad LikeTheSalad left a comment

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.

Thank you!

.subType("LTE")
.build()
private val noNetwork = CurrentNetwork.builder(NetworkState.NO_NETWORK_AVAILABLE).build()
private val mockConnectivityManager = mockk<ConnectivityManager>()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm reasonably sure this mock is taking a long time to construct, but I'll investigate that in a separate changeset later this week.

@breedx-splk breedx-splk merged commit 69298c7 into open-telemetry:main Jul 25, 2025
6 checks passed
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.

4 participants