JMH 为基准测试 JMH had finished, but forked VM did not exit, are there stray running thread
在使用jmh进行测试时,使用了 redisson, redisson内部创建了线程,因此在jmh测试结束后,还在等待其他线程结束,报了以上的信息,以及还存在的线程的信息
可以使用 @TearDown
注解,回收线程,以处理这个问题
如使用 RedissonClient
时,可以使用如下的代码
@TearDown
public void finish(){
redissonClient.shutdown();
}