Update fixes for hystrix stream test

parent 45d769b0
...@@ -21,6 +21,8 @@ import java.net.URL; ...@@ -21,6 +21,8 @@ import java.net.URL;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -55,6 +57,8 @@ import static org.junit.Assert.fail; ...@@ -55,6 +57,8 @@ import static org.junit.Assert.fail;
@DirtiesContext @DirtiesContext
public class HystrixStreamEndpointTests { public class HystrixStreamEndpointTests {
private static final Log log = LogFactory.getLog(HystrixStreamEndpointTests.class);
@LocalServerPort @LocalServerPort
private int port = 0; private int port = 0;
...@@ -80,6 +84,8 @@ public class HystrixStreamEndpointTests { ...@@ -80,6 +84,8 @@ public class HystrixStreamEndpointTests {
byte[] buffer = new byte[1024]; byte[] buffer = new byte[1024];
in.read(buffer); in.read(buffer);
data.add(new String(buffer)); data.add(new String(buffer));
} catch (Exception e) {
log.error("Error getting hystrix stream, try " + i, e);
} }
} }
......
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