Browse Source

Upgrade to Mockito 5.3.0

Closes gh-34998
pull/35015/head
Andy Wilkinson 3 years ago
parent
commit
899ae9c37c
  1. 2
      spring-boot-project/spring-boot-dependencies/build.gradle
  2. 2
      spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/DefaultRestartInitializerTests.java

2
spring-boot-project/spring-boot-dependencies/build.gradle

@ -955,7 +955,7 @@ bom { @@ -955,7 +955,7 @@ bom {
]
}
}
library("Mockito", "4.11.0") {
library("Mockito", "5.3.0") {
group("org.mockito") {
imports = [
"mockito-bom"

2
spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/DefaultRestartInitializerTests.java

@ -103,7 +103,7 @@ class DefaultRestartInitializerTests { @@ -103,7 +103,7 @@ class DefaultRestartInitializerTests {
DefaultRestartInitializer initializer = new DefaultRestartInitializer();
ClassLoader classLoader = new MockAppClassLoader(getClass().getClassLoader());
Thread thread = mock(Thread.class);
thread.setName("main");
given(thread.getName()).willReturn("main");
StackTraceElement element = new StackTraceElement(s, "someMethod", "someFile", 123);
given(thread.getStackTrace()).willReturn(new StackTraceElement[] { element });
given(thread.getContextClassLoader()).willReturn(classLoader);

Loading…
Cancel
Save