From af5ef03c4e7dd61aa1158e76ed0f9514551e4887 Mon Sep 17 00:00:00 2001 From: Adrian Cole Date: Mon, 12 Feb 2018 22:35:27 +0800 Subject: [PATCH] fixes spring tests --- .../brave/spring/webmvc25/ITTracingHandlerInterceptor.java | 5 +++++ .../spring/webmvc/ITTracingAsyncHandlerInterceptor.java | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/instrumentation/spring-webmvc/src/it/spring25/src/test/java/brave/spring/webmvc25/ITTracingHandlerInterceptor.java b/instrumentation/spring-webmvc/src/it/spring25/src/test/java/brave/spring/webmvc25/ITTracingHandlerInterceptor.java index 120b28300f..89cff23a3d 100644 --- a/instrumentation/spring-webmvc/src/it/spring25/src/test/java/brave/spring/webmvc25/ITTracingHandlerInterceptor.java +++ b/instrumentation/spring-webmvc/src/it/spring25/src/test/java/brave/spring/webmvc25/ITTracingHandlerInterceptor.java @@ -8,6 +8,7 @@ import javax.servlet.http.HttpServletResponse; import org.eclipse.jetty.servlet.ServletContextHandler; import org.eclipse.jetty.servlet.ServletHolder; +import org.junit.Ignore; import org.springframework.beans.BeansException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; @@ -23,6 +24,10 @@ public class ITTracingHandlerInterceptor extends ITServletContainer { + @Override @Ignore("HandlerMapping.BEST_MATCHING_PATTERN_ATTRIBUTE doesn't exist until Spring 3") + public void supportsHttpTemplate() { + } + @Controller public static class TestController { final Tracer tracer; diff --git a/instrumentation/spring-webmvc/src/test/java/brave/spring/webmvc/ITTracingAsyncHandlerInterceptor.java b/instrumentation/spring-webmvc/src/test/java/brave/spring/webmvc/ITTracingAsyncHandlerInterceptor.java index 5b17307eb5..8c27e9b023 100644 --- a/instrumentation/spring-webmvc/src/test/java/brave/spring/webmvc/ITTracingAsyncHandlerInterceptor.java +++ b/instrumentation/spring-webmvc/src/test/java/brave/spring/webmvc/ITTracingAsyncHandlerInterceptor.java @@ -72,8 +72,8 @@ public Callable> disconnectAsync() { } @RequestMapping(value = "/items/{itemId}") - public ResponseEntity items(@PathVariable String itemId) throws IOException { - return new ResponseEntity<>(HttpStatus.OK); + public ResponseEntity items(@PathVariable String itemId) { + return new ResponseEntity<>(itemId, HttpStatus.OK); } }