Reinstate testing for NoSuchMethodFailureAnalyzer parsing on OpenJ9
Closes gh-28785
This commit is contained in:
parent
c0cbaa1460
commit
ada2450483
|
@ -54,6 +54,24 @@ class NoSuchMethodFailureAnalyzerTests {
|
||||||
assertThat(typeHierarchy.get(0).getLocation()).asString().contains("spring-core-5.3.12.jar");
|
assertThat(typeHierarchy.get(0).getLocation()).asString().contains("spring-core-5.3.12.jar");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void parseOpenJ9ErrorMessage() {
|
||||||
|
NoSuchMethodDescriptor descriptor = new NoSuchMethodFailureAnalyzer().getNoSuchMethodDescriptor(
|
||||||
|
"org/springframework/util/MimeType.isMoreSpecific(Lorg/springframework/util/MimeType;)Z "
|
||||||
|
+ "(loaded from ...) "
|
||||||
|
+ "called from class org.springframework.boot.diagnostics.analyzer.NoSuchMethodFailureAnalyzerTests "
|
||||||
|
+ "(loaded from ... "
|
||||||
|
+ "by org.springframework.boot.testsupport.classpath.ModifiedClassPathClassLoader@e0ce6310).");
|
||||||
|
assertThat(descriptor).isNotNull();
|
||||||
|
assertThat(descriptor.getErrorMessage())
|
||||||
|
.isEqualTo("org/springframework/util/MimeType.isMoreSpecific(Lorg/springframework/util/MimeType;)Z");
|
||||||
|
assertThat(descriptor.getClassName()).isEqualTo("org.springframework.util.MimeType");
|
||||||
|
assertThat(descriptor.getCandidateLocations().size()).isGreaterThan(1);
|
||||||
|
List<ClassDescriptor> typeHierarchy = descriptor.getTypeHierarchy();
|
||||||
|
assertThat(typeHierarchy).hasSize(1);
|
||||||
|
assertThat(typeHierarchy.get(0).getLocation()).asString().contains("spring-core-5.3.12.jar");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void whenAMethodOnAClassIsMissingThenNoSuchMethodErrorIsAnalyzed() {
|
void whenAMethodOnAClassIsMissingThenNoSuchMethodErrorIsAnalyzed() {
|
||||||
Throwable failure = createFailureForMissingMethod();
|
Throwable failure = createFailureForMissingMethod();
|
||||||
|
|
Loading…
Reference in New Issue