Skip to content

Latest commit

 

History

History
22 lines (13 loc) · 1.17 KB

README.md

File metadata and controls

22 lines (13 loc) · 1.17 KB

BlockHound Demo

This project serves as a demo for BlockHound, which detects execution of blocking code (eg. Thread#sleep) inside non-blocking threads.

It is particularly useful when enabled during tests execution to discover these issues before bringing them in production.

The AllowLoggingIntegration.java shows a way to change BlockHound settings during tests execution by using custom integrations.

The BlockHoundDemoApplicationTests.java class shows a very straightforward example of wrongly/correctly invoking blocking operations relying on different Reactor schedulers (parallel vs elastic).

The StateMachineTransitionServiceTests.java is just a way more realistic and probable example of the same.

Getting started

Just run mvn clean test, sit back and relax.

Reference Documentation

For further reference, please consider the following resources: