Relax test that used to rely on localized message
This reverts commit 93206c3f6e and updates
the related test to only rely on the fact the compiler fails. Relying
on a message will not work and the status code can be implementation
independent according to its javadoc.
Closes gh-31536
This commit is contained in:
@@ -19,7 +19,6 @@ package org.springframework.core.test.tools;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Set;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
@@ -171,9 +170,9 @@ class TestCompilerTests {
|
||||
}
|
||||
""");
|
||||
assertThatExceptionOfType(CompilationException.class).isThrownBy(
|
||||
() -> TestCompiler.forSystem().failOnWarning().withLocale(Locale.ENGLISH)
|
||||
.withSources(SourceFile.of(HELLO_DEPRECATED), main).compile(compiled -> {
|
||||
})).withMessageContaining("warnings found and -Werror specified");
|
||||
() -> TestCompiler.forSystem().failOnWarning().withSources(
|
||||
SourceFile.of(HELLO_DEPRECATED), main).compile(compiled -> {
|
||||
}));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user