-
Notifications
You must be signed in to change notification settings - Fork 41.7k
Closed
Description
Spring Boot 1.5.15
The line:
spring-boot/spring-boot-test/src/main/java/org/springframework/boot/test/mock/mockito/MockReset.java
Line 106 in bd482d7
| if (ClassUtils.isPresent("org.mockito.internal.util.MockUtil", null)) { |
...checks for the presence of Mockito on every call. This is executed before AND after each test for every bean in the context.
In spring-boot 2.0 this has already been refactored to check once in the ResetMocksTestExecutionListener and store the result in a static variable. It would be nice if this could be back ported to 1.5.x as well.
Our project has about 1500 beans and we run around 8,300 tests. This results in over 12 million calls to this method. Stubbing out the ResetMocksTestExecutionListener improves performance by about 10x.
Metadata
Metadata
Assignees
Labels
type: bugA general bugA general bug