AsyncRestTemplate triggers no-output HTTP requests immediately as well

Issue: SPR-14093
This commit is contained in:
Juergen Hoeller
2016-03-29 15:22:32 +02:00
parent 2dae4d8134
commit 6298292523
5 changed files with 28 additions and 10 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,16 +16,19 @@
package org.springframework.http.client;
import static org.junit.Assert.assertEquals;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.ProtocolException;
import java.net.URL;
import org.junit.Test;
import org.springframework.http.HttpMethod;
import static org.junit.Assert.*;
public class BufferedSimpleHttpRequestFactoryTests extends AbstractHttpRequestFactoryTestCase {
@Override
@@ -89,5 +92,11 @@ public class BufferedSimpleHttpRequestFactoryTests extends AbstractHttpRequestFa
public boolean usingProxy() {
return false;
}
@Override
public InputStream getInputStream() throws IOException {
return new ByteArrayInputStream(new byte[0]);
}
}
}