Skip to content

Instantly share code, notes, and snippets.

@michaldo
michaldo / gist:19126c61c90297c0b593bbf8136fc4a7
Created November 25, 2020 23:22
Spring Boot JPA deffered cause a deadlock in unit test
"task-2@17221" prio=5 tid=0x21 nid=NA waiting for monitor entry
java.lang.Thread.State: BLOCKED
waiting for main@1 to release lock on <0x434b> (a java.util.concurrent.ConcurrentHashMap)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:186)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:168)
at org.springframework.context.event.AbstractApplicationEventMulticaster.retrieveApplicationListeners(AbstractApplicationEventMulticaster.java:264)
at org.springframework.context.event.AbstractApplicationEventMulticaster.getApplicationListeners(AbstractApplicationEventMulticaster.java:204)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:134)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:404)
at org.springframework.c
import java.util.ArrayList;
import java.util.List;
public class OldCheckpoints {
private boolean completed = false;
private List<Point> chechpoints = new ArrayList<>();
private Point first;
class Point {
final int x;
final int y;
public Point(int x, int y) {
this.x = x;
this.y = y;
}