Compatibility with the latest dependencies

* Upgrade to Gradle 3.5, SS-5.0, Hibernate-5.2.10, Mockito-2.7.22, Pah-1.1.1
And some other minor upgrades
* Fix deprecations for Mockito compatibility
* Fix `ServletWebSocketHandlerRegistry` deprecations
* Fix SD-Mongo deprecations
* Tweak JMX tests to avoid dangling threads after tests exist
* Increase timeouts in some polling tests
This commit is contained in:
Artem Bilan
2017-04-26 11:29:18 -04:00
parent 3c047c5076
commit 026484c382
16 changed files with 119 additions and 72 deletions

View File

@@ -21,7 +21,7 @@ import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertThat;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.spy;
@@ -31,7 +31,6 @@ import javax.jms.Session;
import org.apache.commons.logging.Log;
import org.junit.Test;
import org.mockito.internal.stubbing.answers.DoesNothing;
import org.springframework.beans.DirectFieldAccessor;
import org.springframework.beans.factory.BeanFactory;
@@ -74,7 +73,7 @@ public class ChannelPublishingJmsMessageListenerTests {
final QueueChannel requestChannel = new QueueChannel();
ChannelPublishingJmsMessageListener listener = new ChannelPublishingJmsMessageListener();
Log logger = spy(TestUtils.getPropertyValue(listener, "logger", Log.class));
doAnswer(new DoesNothing()).when(logger).error(anyString(), any(Throwable.class));
doNothing().when(logger).error(anyString(), any(Throwable.class));
new DirectFieldAccessor(listener).setPropertyValue("logger", logger);
listener.setRequestChannel(requestChannel);
QueueChannel errorChannel = new QueueChannel();