Skip to content

Commit

Permalink
br/TACO-137 mvn fmt:format
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Radebaugh committed Apr 16, 2018
1 parent 181fdac commit 8ee34e5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception
}

@Override
public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception {
public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise)
throws Exception {
super.write(ctx, msg, promise);

if (msg instanceof Response) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import io.netty.channel.embedded.EmbeddedChannel;
import io.netty.handler.codec.http.HttpMethod;
import io.netty.handler.codec.http.HttpResponseStatus;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
Expand All @@ -26,24 +25,18 @@ public void setUp() {
MetricsHandler metricsHandler = new MetricsHandler(metricRegistry);

channel = new EmbeddedChannel();
channel
.pipeline()
.addLast(metricsHandler);
}

@After
public void tearDown() {

channel.pipeline().addLast(metricsHandler);
}

@Test
public void testRequestsMeter() {
DefaultFullRequest request = DefaultFullRequest.builder()
.body(Unpooled.EMPTY_BUFFER)
.headers(new DefaultHeaders())
.method(HttpMethod.GET)
.path("/foo")
.build();
DefaultFullRequest request =
DefaultFullRequest.builder()
.body(Unpooled.EMPTY_BUFFER)
.headers(new DefaultHeaders())
.method(HttpMethod.GET)
.path("/foo")
.build();

channel.writeInbound(request);
channel.runPendingTasks();
Expand Down Expand Up @@ -108,9 +101,9 @@ public void testStatusClassUnknownMeter() {

private DefaultFullResponse buildResponse(HttpResponseStatus httpResponseStatus) {
return DefaultFullResponse.builder()
.body(Unpooled.EMPTY_BUFFER)
.headers(new DefaultHeaders())
.status(httpResponseStatus)
.build();
.body(Unpooled.EMPTY_BUFFER)
.headers(new DefaultHeaders())
.status(httpResponseStatus)
.build();
}
}

0 comments on commit 8ee34e5

Please sign in to comment.