Skip to content

Avoid potentially exception throwing side effects from IdlingResourceTimeoutException being thrown - #2439

Merged
copybara-service[bot] merged 1 commit into
mainfrom
piper_800164506
Sep 3, 2025
Merged

copybara-service[bot] merged 1 commit into
mainfrom
piper_800164506

Conversation

@copybara-service

Copy link
Copy Markdown

Avoid potentially exception throwing side effects from IdlingResourceTimeoutException being thrown

Interactions with TestOutputEmitter can throw, and if it does it suppresses the IdlingResourceTimeoutException exception from even being created. Instead of having this side effect in the IdlingResourceTimeoutException constructor move the thread dumping out of the constructor and wrap it in a try/catch, attaching any exceptions as suppressed by the IdlingResourceTimeoutException exception.

In particular this can happen if more than one TestOutputHandler is registered.

@copybara-service
copybara-service Bot force-pushed the piper_800164506 branch 3 times, most recently from 419aaff to ab6d9d7 Compare September 3, 2025 03:27
…eTimeoutException` being thrown

Interactions with `TestOutputEmitter` can throw, and if it does it suppresses the `IdlingResourceTimeoutException` exception from even being created. Instead of having this side effect in the `IdlingResourceTimeoutException` constructor move the thread dumping out of the constructor and wrap it in a try/catch, attaching any exceptions as suppressed by the `IdlingResourceTimeoutException` exception.

In particular this can happen if more than one `TestOutputHandler` is registered.

PiperOrigin-RevId: 802381773
@copybara-service
copybara-service Bot merged commit d257dfc into main Sep 3, 2025
@copybara-service
copybara-service Bot deleted the piper_800164506 branch September 3, 2025 03:37
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.

1 participant