Upgrade to RxJava 2.0 RC3 (as well as EhCache 3.1.3 and Hibernate ORM 5.2.3)
This commit is contained in:
parent
cfa0f6c84b
commit
2fea1f7da3
|
@ -40,7 +40,7 @@ configure(allprojects) { project ->
|
|||
ext.eclipselinkVersion = "2.6.4"
|
||||
ext.ehcacheVersion = "2.10.2"
|
||||
ext.ehcachejcacheVersion = "1.0.1"
|
||||
ext.ehcache3Version = "3.1.2"
|
||||
ext.ehcache3Version = "3.1.3"
|
||||
ext.ejbApiVersion = "3.2"
|
||||
ext.elApiVersion = "3.0.1-b04"
|
||||
ext.fileuploadVersion = "1.3.2"
|
||||
|
@ -48,7 +48,7 @@ configure(allprojects) { project ->
|
|||
ext.groovyVersion = "2.4.7"
|
||||
ext.gsonVersion = "2.7"
|
||||
ext.hamcrestVersion = "1.3"
|
||||
ext.hibernate5Version = "5.2.2.Final"
|
||||
ext.hibernate5Version = "5.2.3.Final"
|
||||
ext.hibval5Version = "5.3.0.CR1"
|
||||
ext.hsqldbVersion = "2.3.4"
|
||||
ext.httpasyncVersion = "4.1.2"
|
||||
|
@ -82,7 +82,7 @@ configure(allprojects) { project ->
|
|||
ext.reactorNettyVersion = '0.5.1.RELEASE'
|
||||
ext.romeVersion = "1.7.0"
|
||||
ext.rxjavaVersion = '1.1.9'
|
||||
ext.rxjava2Version = '2.0.0-RC2'
|
||||
ext.rxjava2Version = '2.0.0-RC3'
|
||||
ext.rxnettyVersion = '0.5.2-rc.4'
|
||||
ext.servletVersion = "3.1.0"
|
||||
ext.slf4jVersion = "1.7.21"
|
||||
|
|
|
@ -61,12 +61,8 @@ import org.springframework.web.server.UnsupportedMediaTypeStatusException;
|
|||
import org.springframework.web.server.adapter.DefaultServerWebExchange;
|
||||
import org.springframework.web.server.session.MockWebSessionManager;
|
||||
|
||||
import static org.junit.Assert.assertArrayEquals;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.springframework.core.ResolvableType.forClass;
|
||||
import static org.springframework.core.ResolvableType.forClassWithGenerics;
|
||||
import static org.junit.Assert.*;
|
||||
import static org.springframework.core.ResolvableType.*;
|
||||
|
||||
/**
|
||||
* Unit tests for {@link AbstractMessageReaderArgumentResolver}.
|
||||
|
@ -174,7 +170,7 @@ public class MessageReaderArgumentResolverTests {
|
|||
io.reactivex.Observable<?> observable = resolveValue(param, body);
|
||||
|
||||
assertEquals(Arrays.asList(new TestBean("f1", "b1"), new TestBean("f2", "b2")),
|
||||
observable.toList().blockingFirst());
|
||||
observable.toList().blockingGet());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -185,7 +181,7 @@ public class MessageReaderArgumentResolverTests {
|
|||
Flowable<?> flowable = resolveValue(param, body);
|
||||
|
||||
assertEquals(Arrays.asList(new TestBean("f1", "b1"), new TestBean("f2", "b2")),
|
||||
flowable.toList().blockingFirst());
|
||||
flowable.toList().blockingGet());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -57,11 +57,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.reactive.config.WebReactiveConfiguration;
|
||||
|
||||
import static java.util.Arrays.asList;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.springframework.http.MediaType.APPLICATION_XML;
|
||||
|
||||
import static java.util.Arrays.*;
|
||||
import static org.junit.Assert.*;
|
||||
import static org.springframework.http.MediaType.*;
|
||||
|
||||
/**
|
||||
* {@code @RequestMapping} integration tests focusing on serialization and
|
||||
|
@ -411,6 +409,7 @@ public class RequestMappingMessageConversionIntegrationTests extends AbstractReq
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/person-response")
|
||||
@SuppressWarnings("unused")
|
||||
|
@ -463,6 +462,7 @@ public class RequestMappingMessageConversionIntegrationTests extends AbstractReq
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
@RestController
|
||||
@SuppressWarnings("unused")
|
||||
private static class ResourceController {
|
||||
|
@ -473,6 +473,7 @@ public class RequestMappingMessageConversionIntegrationTests extends AbstractReq
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/person-transform")
|
||||
@SuppressWarnings("unused")
|
||||
|
@ -532,6 +533,7 @@ public class RequestMappingMessageConversionIntegrationTests extends AbstractReq
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/person-create")
|
||||
@SuppressWarnings("unused")
|
||||
|
@ -570,17 +572,19 @@ public class RequestMappingMessageConversionIntegrationTests extends AbstractReq
|
|||
}
|
||||
|
||||
@PostMapping("/rxjava2-observable")
|
||||
public io.reactivex.Observable<Void> createWithRxJava2Observable(@RequestBody io.reactivex.Observable<Person> observable) {
|
||||
return observable.toList().doOnNext(persons::addAll).flatMap(document -> io.reactivex.Observable.empty());
|
||||
public io.reactivex.Completable createWithRxJava2Observable(@RequestBody io.reactivex.Observable<Person> observable) {
|
||||
return observable.toList().doOnSuccess(persons::addAll).toCompletable();
|
||||
}
|
||||
|
||||
@PostMapping("/flowable")
|
||||
public Flowable<Void> createWithFlowable(@RequestBody Flowable<Person> flowable) {
|
||||
return flowable.toList().doOnNext(persons::addAll).flatMap(document -> Flowable.empty());
|
||||
public io.reactivex.Completable createWithFlowable(@RequestBody Flowable<Person> flowable) {
|
||||
return flowable.toList().doOnSuccess(persons::addAll).toCompletable();
|
||||
}
|
||||
}
|
||||
|
||||
@XmlRootElement @SuppressWarnings("WeakerAccess")
|
||||
|
||||
@XmlRootElement
|
||||
@SuppressWarnings("WeakerAccess")
|
||||
private static class Person {
|
||||
|
||||
private String name;
|
||||
|
@ -626,7 +630,9 @@ public class RequestMappingMessageConversionIntegrationTests extends AbstractReq
|
|||
}
|
||||
}
|
||||
|
||||
@XmlRootElement @SuppressWarnings({"WeakerAccess", "unused"})
|
||||
|
||||
@XmlRootElement
|
||||
@SuppressWarnings({"WeakerAccess", "unused"})
|
||||
private static class People {
|
||||
|
||||
private List<Person> persons = new ArrayList<>();
|
||||
|
|
Loading…
Reference in New Issue