Made tests less brittle

This commit is contained in:
Marcin Grzejszczak
2017-11-22 10:30:01 +01:00
parent 82cff6e9e9
commit 4520268303

View File

@@ -16,6 +16,9 @@
package org.springframework.cloud.sleuth.instrument.web;
import static org.assertj.core.api.Assertions.fail;
import static org.springframework.cloud.sleuth.assertions.SleuthAssertions.then;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;
@@ -51,9 +54,6 @@ import org.springframework.web.client.DefaultResponseErrorHandler;
import org.springframework.web.client.HttpClientErrorException;
import org.springframework.web.client.RestTemplate;
import static org.assertj.core.api.Assertions.fail;
import static org.springframework.cloud.sleuth.assertions.SleuthAssertions.then;
/**
* @author Marcin Grzejszczak
*/
@@ -94,7 +94,7 @@ public class TraceFilterWebIntegrationTests {
String[] split = capture.toString().split("\n");
List<String> list = Arrays.stream(split).filter(s -> s.contains(
"Uncaught exception thrown"))
.filter(s -> s.contains("[bootstrap," + hex + "," + hex + ",true]"))
.filter(s -> s.contains(hex + "," + hex + ",true]"))
.collect(Collectors.toList());
then(list).isNotEmpty();
}