Skip to content

Commit

Permalink
Merge pull request Netflix#1270 from mattrjacobs/fix-deprecations
Browse files Browse the repository at this point in the history
Fix deprecations
  • Loading branch information
mattrjacobs authored Jul 7, 2016
2 parents f162e27 + 94c5cbb commit 2bea399
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ private Observable<Void> handleHystrixRequest(final HttpServerResponse<O> respon

final Subject<Void, Void> subject = PublishSubject.create();
final MultipleAssignmentSubscription subscription = new MultipleAssignmentSubscription();
Subscription actionSubscription = Observable.timer(0, interval, TimeUnit.MILLISECONDS, Schedulers.computation())
Subscription actionSubscription = Observable.interval(interval, TimeUnit.MILLISECONDS)
.subscribe(new Action1<Long>() {
@Override
public void call(Long tick) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import io.reactivex.netty.protocol.http.server.HttpServerRequest;
import io.reactivex.netty.protocol.http.server.HttpServerResponse;
import io.reactivex.netty.protocol.http.server.RequestHandler;
import io.reactivex.netty.protocol.text.sse.ServerSentEvent;
import io.reactivex.netty.protocol.http.sse.ServerSentEvent;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
Expand Down Expand Up @@ -71,7 +71,7 @@ public void setUp() throws Exception {

client = RxNetty.<ByteBuf, ServerSentEvent>newHttpClientBuilder("localhost", port)
.withNoConnectionPooling()
.pipelineConfigurator(PipelineConfigurators.<ByteBuf>sseClientConfigurator())
.pipelineConfigurator(PipelineConfigurators.<ByteBuf>clientSseConfigurator())
.build();

mockStatic(HystrixCommandMetrics.class);
Expand Down Expand Up @@ -100,11 +100,11 @@ public Observable<? extends ServerSentEvent> call(HttpClientResponse<ServerSentE
}
});

Object first = Observable.amb(objectObservable, Observable.timer(1000, TimeUnit.MILLISECONDS)).toBlocking().first();
Object first = Observable.amb(objectObservable, Observable.timer(5000, TimeUnit.MILLISECONDS)).toBlocking().first();

assertTrue("Expected SSE message", first instanceof ServerSentEvent);
ServerSentEvent sse = (ServerSentEvent) first;
JsonNode jsonNode = mapper.readTree(sse.getEventData());
JsonNode jsonNode = mapper.readTree(sse.contentAsString());
assertEquals("Expected hystrix key name", HystrixCommandMetricsSamples.SAMPLE_1.getCommandKey().name(), jsonNode.get("name").asText());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2757,7 +2757,7 @@ public Boolean call(Boolean b) {
return b;
}

}).finallyDo(new Action0() {
}).doAfterTerminate(new Action0() {

@Override
public void call() {
Expand Down Expand Up @@ -2807,7 +2807,7 @@ public Boolean call(Boolean b) {
return b;
}

}).finallyDo(new Action0() {
}).doAfterTerminate(new Action0() {

@Override
public void call() {
Expand Down Expand Up @@ -2857,7 +2857,7 @@ public Boolean call(Boolean b) {
return b;
}

}).finallyDo(new Action0() {
}).doAfterTerminate(new Action0() {

@Override
public void call() {
Expand Down

0 comments on commit 2bea399

Please sign in to comment.