We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 601bc55 commit d8c1b96Copy full SHA for d8c1b96
src/test/java/com/yannbriancon/interceptor/NPlusOneQueriesExceptionTest.java
@@ -66,10 +66,15 @@ void nPlusOneQueriesDetection_isNotThrowingExceptionWhenNoNPlusOneQueries() {
66
.collect(Collectors.toList());
67
}
68
69
-
70
@Test
71
- void hibernateQueryInterceptor_isDetectingNPlusOneQueriesWhenMissingEagerFetchingOnManyToOne() {
+ void nPlusOneQueriesDetection_isNotThrowingExceptionWhenLoopingOnSameMethod() {
+ for (Long id = 0L; id < 2; id++) {
72
+ messageRepository.findById(id);
73
+ }
74
75
76
+ @Test
77
+ void nPlusOneQueriesDetection_throwsExceptionWhenMissingEagerFetchingOnManyToOne() {
78
try {
79
// Test a method that should return a N+1 query
80
// The query triggers N+1 queries to eager fetch the user field
0 commit comments