Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable BlockHound for integration tests and stability tests #2863

Merged
merged 6 commits into from
Nov 23, 2021

Conversation

Bennett-Lynch
Copy link
Contributor

@Bennett-Lynch Bennett-Lynch commented Nov 20, 2021

This PR enables BlockHound for the SDK integration test and stability tests. BlockHound can be used to detect blocking behavior in threads that must be treated as non-blocking, like Netty's EventLoop threads.

If BlockHound detects an illegal blocking operation being performed, it will throw a BlockingOperationError. Doing so in an integration test would typically fail the integration test and allow us to investigate the behavior.

This PR enables BlockHound by leveraging BlockHound's provided BlockHoundTestExecutionListener, which uses @AutoService to automatically register with JUnit 5's ServiceLoader support:

https://junit.org/junit5/docs/current/user-guide/#launcher-api-listeners-custom

License

  • I confirm that this pull request can be released under the Apache 2 license

This PR enables [BlockHound](https://github.com/reactor/BlockHound)
for the SDK integration test and stability tests. BlockHound can be used
to detect blocking behavior in threads that must be treated as
non-blocking, like Netty's EventLoop threads.

If BlockHound detects an illegal blocking operation being performed, it
will throw a BlockingOperationError. Doing so in an integration test
would typically fail the integration test and allow us to investigate
the behavior.

This PR enables BlockHound by leveraging BlockHound's provided
[BlockHoundTestExecutionListener](https://github
.com/reactor/BlockHound/blob/2071ca8dbb06eba9ffa65596f327e3182d3b9730
/junit-platform/src/main/java/reactor/blockhound/junit/platform
/BlockHoundTestExecutionListener.java), which uses @autoservice to
automatically register with JUnit 5's ServiceLoader support:

https://junit.org/junit5/docs/current/user-guide/#launcher-api-listeners-custom
@Bennett-Lynch Bennett-Lynch changed the title Enable BlockHound for integration tests and stability tests <Draft> Enable BlockHound for integration tests and stability tests Nov 20, 2021
@Bennett-Lynch Bennett-Lynch marked this pull request as ready for review November 22, 2021 22:49
@Bennett-Lynch Bennett-Lynch requested a review from a team as a code owner November 22, 2021 22:49
@Bennett-Lynch Bennett-Lynch changed the title <Draft> Enable BlockHound for integration tests and stability tests Enable BlockHound for integration tests and stability tests Nov 22, 2021
@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@Bennett-Lynch Bennett-Lynch merged commit a5f7a2e into aws:master Nov 23, 2021
aws-sdk-java-automation added a commit that referenced this pull request Jan 18, 2024
…94ce5cc3f

Pull request: release <- staging/11eb5edd-0383-480e-9d58-45c94ce5cc3f
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