Upgrade to RxJava 2.0 RC3 (as well as EhCache 3.1.3 and Hibernate ORM 5.2.3)
This commit is contained in:
@@ -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<>();
|
||||
|
||||
Reference in New Issue
Block a user