Skip to content

A demo project showing BlockHound (bootstrapped via a custom TestExecutionListener) in action during JUnit tests execution.

Notifications You must be signed in to change notification settings

dsibilio/blockhound-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

About

A demo project showing BlockHound (bootstrapped via a custom TestExecutionListener) in action during JUnit tests execution.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages