Skip to content

Commit facda3d

Browse files
committed
Adapt to change in exception hierarchy
See gh-44442
1 parent a9615f9 commit facda3d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

spring-boot-project/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
import org.springframework.aot.AotDetector;
4747
import org.springframework.beans.factory.BeanCreationException;
4848
import org.springframework.beans.factory.BeanCurrentlyInCreationException;
49+
import org.springframework.beans.factory.BeanDefinitionStoreException;
4950
import org.springframework.beans.factory.ObjectProvider;
5051
import org.springframework.beans.factory.UnsatisfiedDependencyException;
5152
import org.springframework.beans.factory.annotation.Autowired;
@@ -220,8 +221,10 @@ void sourcesMustNotBeEmpty() {
220221

221222
@Test
222223
void sourcesMustBeAccessible() {
223-
assertThatIllegalArgumentException()
224+
assertThatExceptionOfType(BeanDefinitionStoreException.class)
224225
.isThrownBy(() -> new SpringApplication(InaccessibleConfiguration.class).run())
226+
.havingRootCause()
227+
.isInstanceOf(IllegalArgumentException.class)
225228
.withMessageContaining("No visible constructors");
226229
}
227230

0 commit comments

Comments
 (0)