Commit 06eb2455 authored by Andy Wilkinson's avatar Andy Wilkinson

Fix HttpTunnelConnectionTests following changes for null handling

parent 776933a1
...@@ -57,7 +57,7 @@ public class MockClientHttpRequestFactory implements ClientHttpRequestFactory { ...@@ -57,7 +57,7 @@ public class MockClientHttpRequestFactory implements ClientHttpRequestFactory {
public void willRespond(HttpStatus... response) { public void willRespond(HttpStatus... response) {
for (HttpStatus status : response) { for (HttpStatus status : response) {
this.responses.add(new Response(0, NO_DATA, status)); this.responses.add(new Response(0, null, status));
} }
} }
...@@ -119,7 +119,7 @@ public class MockClientHttpRequestFactory implements ClientHttpRequestFactory { ...@@ -119,7 +119,7 @@ public class MockClientHttpRequestFactory implements ClientHttpRequestFactory {
public ClientHttpResponse asHttpResponse(AtomicLong seq) { public ClientHttpResponse asHttpResponse(AtomicLong seq) {
MockClientHttpResponse httpResponse = new MockClientHttpResponse( MockClientHttpResponse httpResponse = new MockClientHttpResponse(
this.payload == null ? new byte[0] : this.payload, this.status); this.payload == null ? NO_DATA : this.payload, this.status);
waitForDelay(); waitForDelay();
if (this.payload != null) { if (this.payload != null) {
httpResponse.getHeaders().setContentLength(this.payload.length); httpResponse.getHeaders().setContentLength(this.payload.length);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment