Updates to use new boot 3 class in version verifier.

This commit is contained in:
spencergibb
2022-03-25 11:15:06 -04:00
parent 63cbb815b0
commit bed3e3de6e
2 changed files with 12 additions and 22 deletions

View File

@@ -80,14 +80,16 @@ class SpringBootVersionVerifier implements CompatibilityVerifier {
@Override
public boolean isCompatible() {
// try {
// since 3.0
// FIXME: find class or method in boot that is new in 3.0
// Class.forName("org.springframework.boot.autoconfigure.data.redis.ClientResourcesBuilderCustomizer");
return true;
/*
* } catch (ClassNotFoundException e) { return false; }
*/
try {
// since 3.0
Class.forName(
"org.springframework.boot.context.properties.ConfigurationPropertiesBindConstructorProvider");
return true;
}
catch (ClassNotFoundException e) {
return false;
}
}
};

View File

@@ -175,20 +175,8 @@ public class SpringBootDependencyTests {
@Test
public void should_match_against_current_manifest() {
try {
verifyCurrentVersionFromManifest("3.0");
verifyCurrentVersionFromManifest("3.0.x");
}
catch (AssertionError e) {
if (e.getMessage() != null && e.getMessage().contains("2.7.")) {
// we're likely running a boot 2.7 compatibility test, try 2.7
verifyCurrentVersionFromManifest("2.7");
verifyCurrentVersionFromManifest("2.7.x");
}
else {
throw e;
}
}
verifyCurrentVersionFromManifest("3.0");
verifyCurrentVersionFromManifest("3.0.x");
}
private void verifyCurrentVersionFromManifest(String version) {