Switch to Reactor 3 snapshots and Netty 4.1.3

This commit is contained in:
Rossen Stoyanchev
2016-07-15 17:15:33 -04:00
parent dc1664939c
commit 028be2a298
50 changed files with 113 additions and 123 deletions

View File

@@ -22,7 +22,7 @@ import static org.junit.Assert.*;
import org.junit.Test;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import reactor.core.test.TestSubscriber;
import reactor.test.TestSubscriber;
import org.springframework.core.ResolvableType;
import org.springframework.core.io.buffer.AbstractDataBufferAllocatingTestCase;

View File

@@ -23,7 +23,7 @@ import java.util.List;
import org.junit.Test;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import reactor.core.test.TestSubscriber;
import reactor.test.TestSubscriber;
import org.springframework.core.ResolvableType;
import org.springframework.core.io.buffer.AbstractDataBufferAllocatingTestCase;

View File

@@ -21,7 +21,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
import org.junit.Before;
import org.junit.Test;
import reactor.core.publisher.Flux;
import reactor.core.test.TestSubscriber;
import reactor.test.TestSubscriber;
import org.springframework.core.ResolvableType;
import org.springframework.core.io.buffer.AbstractDataBufferAllocatingTestCase;

View File

@@ -20,7 +20,7 @@ import java.nio.charset.StandardCharsets;
import org.junit.Test;
import reactor.core.publisher.Flux;
import reactor.core.test.TestSubscriber;
import reactor.test.TestSubscriber;
import org.springframework.core.io.buffer.AbstractDataBufferAllocatingTestCase;
import org.springframework.core.io.buffer.DataBuffer;

View File

@@ -22,7 +22,7 @@ import javax.xml.stream.events.XMLEvent;
import org.junit.Test;
import reactor.core.publisher.Flux;
import reactor.core.test.TestSubscriber;
import reactor.test.TestSubscriber;
import org.springframework.core.ResolvableType;
import org.springframework.core.io.buffer.AbstractDataBufferAllocatingTestCase;

View File

@@ -23,7 +23,7 @@ import org.junit.Before;
import org.junit.Test;
import org.xml.sax.SAXException;
import reactor.core.publisher.Flux;
import reactor.core.test.TestSubscriber;
import reactor.test.TestSubscriber;
import org.springframework.core.ResolvableType;
import org.springframework.core.io.buffer.AbstractDataBufferAllocatingTestCase;

View File

@@ -20,7 +20,7 @@ import javax.xml.stream.events.XMLEvent;
import org.junit.Test;
import reactor.core.publisher.Flux;
import reactor.core.test.TestSubscriber;
import reactor.test.TestSubscriber;
import org.springframework.core.io.buffer.AbstractDataBufferAllocatingTestCase;

View File

@@ -29,10 +29,13 @@ import org.reactivestreams.Subscriber;
import org.reactivestreams.Subscription;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import reactor.core.publisher.OperatorAdapter;
import reactor.core.publisher.Signal;
import reactor.core.subscriber.SubscriberBarrier;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
/**
* @author Rossen Stoyanchev
@@ -145,7 +148,7 @@ public class ChannelSendOperatorTests {
};
}
private class WriteSubscriber extends SubscriberBarrier<String, Void> {
private class WriteSubscriber extends OperatorAdapter<String, Void> {
public WriteSubscriber(Subscriber<? super Void> subscriber) {
super(subscriber);

View File

@@ -21,7 +21,7 @@ import org.junit.Test;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import reactor.core.test.TestSubscriber;
import reactor.test.TestSubscriber;
import org.springframework.core.io.buffer.DataBuffer;
import org.springframework.core.io.buffer.FlushingDataBuffer;

View File

@@ -16,8 +16,7 @@
package org.springframework.http.server.reactive.bootstrap;
import reactor.core.flow.Loopback;
import reactor.core.state.Completable;
import reactor.core.Loopback;
import org.springframework.http.server.reactive.ReactorHttpHandlerAdapter;
import org.springframework.util.Assert;
@@ -25,8 +24,7 @@ import org.springframework.util.Assert;
/**
* @author Stephane Maldini
*/
public class ReactorHttpServer extends HttpServerSupport
implements HttpServer, Loopback, Completable {
public class ReactorHttpServer extends HttpServerSupport implements HttpServer, Loopback {
private ReactorHttpHandlerAdapter reactorHandler;
@@ -34,6 +32,7 @@ public class ReactorHttpServer extends HttpServerSupport
private boolean running;
@Override
public void afterPropertiesSet() throws Exception {
@@ -42,6 +41,7 @@ public class ReactorHttpServer extends HttpServerSupport
this.reactorServer = reactor.io.netty.http.HttpServer.create(getHost(), getPort());
}
@Override
public boolean isRunning() {
return this.running;
@@ -57,16 +57,6 @@ public class ReactorHttpServer extends HttpServerSupport
return reactorServer;
}
@Override
public boolean isStarted() {
return running;
}
@Override
public boolean isTerminated() {
return !running;
}
@Override
public void start() {
if (!this.running) {

View File

@@ -33,7 +33,7 @@ import org.junit.Before;
import org.junit.Test;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import reactor.core.test.TestSubscriber;
import reactor.test.TestSubscriber;
import org.springframework.http.codec.Pojo;
import org.springframework.http.HttpHeaders;