Bump to boot 2.3.0.M2
- Needed gradle change to 5.6 - There's different mongo client in deps so needed to fix MongoDbRule as it was done for master.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
buildscript {
|
||||
ext {
|
||||
log4jVersion = '1.2.17'
|
||||
springBootVersion = '2.2.4.RELEASE'
|
||||
springBootVersion = '2.3.0.M2'
|
||||
eclipsePersistenceVersion = '2.1.1'
|
||||
kryoVersion = '4.0.2'
|
||||
springCloudClusterVersion = '1.0.2.RELEASE'
|
||||
|
||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2016-2017 the original author or authors.
|
||||
* Copyright 2016-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -15,40 +15,32 @@
|
||||
*/
|
||||
package org.springframework.statemachine.buildtests.tck.mongodb;
|
||||
|
||||
import org.junit.rules.TestRule;
|
||||
import org.junit.rules.TestWatcher;
|
||||
import org.junit.runner.Description;
|
||||
import org.junit.runners.model.Statement;
|
||||
import com.mongodb.MongoClient;
|
||||
import com.mongodb.MongoClientOptions;
|
||||
import com.mongodb.ServerAddress;
|
||||
import org.springframework.util.SocketUtils;
|
||||
|
||||
/**
|
||||
* Rule skipping tests if MongoDb is not available from localhost with default settings.
|
||||
* Rule skipping tests if MongoDb is not available from localhost simply by
|
||||
* checking if port can be bind.
|
||||
*
|
||||
* @author Janne Valkealahti
|
||||
*
|
||||
*/
|
||||
public class MongoDbRule extends TestWatcher implements TestRule {
|
||||
public class MongoDbRule extends TestWatcher {
|
||||
|
||||
@Override
|
||||
public Statement apply(Statement base, Description description) {
|
||||
MongoClient client = null;
|
||||
|
||||
try {
|
||||
client = new MongoClient(new ServerAddress(),
|
||||
MongoClientOptions.builder().connectTimeout(50).serverSelectionTimeout(50).build());
|
||||
client.getAddress();
|
||||
} catch (Exception e) {
|
||||
SocketUtils.findAvailableTcpPort(27017, 27017);
|
||||
return super.apply(new Statement() {
|
||||
@Override
|
||||
public void evaluate() throws Throwable {
|
||||
}
|
||||
}, Description.EMPTY);
|
||||
} finally {
|
||||
if (client != null) {
|
||||
client.close();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return super.apply(base, description);
|
||||
}
|
||||
return super.apply(base, description);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2016-2017 the original author or authors.
|
||||
* Copyright 2016-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -15,40 +15,32 @@
|
||||
*/
|
||||
package org.springframework.statemachine.data.mongodb;
|
||||
|
||||
import org.junit.rules.TestRule;
|
||||
import org.junit.rules.TestWatcher;
|
||||
import org.junit.runner.Description;
|
||||
import org.junit.runners.model.Statement;
|
||||
import com.mongodb.MongoClient;
|
||||
import com.mongodb.MongoClientOptions;
|
||||
import com.mongodb.ServerAddress;
|
||||
import org.springframework.util.SocketUtils;
|
||||
|
||||
/**
|
||||
* Rule skipping tests if MongoDb is not available from localhost with default settings.
|
||||
* Rule skipping tests if MongoDb is not available from localhost simply by
|
||||
* checking if port can be bind.
|
||||
*
|
||||
* @author Janne Valkealahti
|
||||
*
|
||||
*/
|
||||
public class MongoDbRule extends TestWatcher implements TestRule {
|
||||
public class MongoDbRule extends TestWatcher {
|
||||
|
||||
@Override
|
||||
public Statement apply(Statement base, Description description) {
|
||||
MongoClient client = null;
|
||||
|
||||
try {
|
||||
client = new MongoClient(new ServerAddress(),
|
||||
MongoClientOptions.builder().connectTimeout(50).serverSelectionTimeout(50).build());
|
||||
client.getAddress();
|
||||
} catch (Exception e) {
|
||||
SocketUtils.findAvailableTcpPort(27017, 27017);
|
||||
return super.apply(new Statement() {
|
||||
@Override
|
||||
public void evaluate() throws Throwable {
|
||||
}
|
||||
}, Description.EMPTY);
|
||||
} finally {
|
||||
if (client != null) {
|
||||
client.close();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return super.apply(base, description);
|
||||
}
|
||||
return super.apply(base, description);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user