Misc fixes

This commit is contained in:
Tyler Benson 2019-08-06 08:11:37 -07:00
parent 668b1059f5
commit 38cc03ae9e
2 changed files with 7 additions and 9 deletions

View File

@ -4,7 +4,6 @@ import datadog.trace.agent.test.base.HttpServerTest
import io.vertx.circuitbreaker.CircuitBreakerOptions
import io.vertx.reactivex.circuitbreaker.CircuitBreaker
import io.vertx.reactivex.core.AbstractVerticle
import io.vertx.reactivex.core.Future
import io.vertx.reactivex.ext.web.Router
import static datadog.trace.agent.test.base.HttpServerTest.ServerEndpoint.ERROR
@ -39,7 +38,7 @@ class VertxRxCircuitBreakerHttpServerTest extends VertxHttpServerTest {
}
result.setHandler {
if (it.failed()) {
throw it.cause();
throw it.cause()
}
HttpServerTest.ServerEndpoint endpoint = it.result()
controller(endpoint) {
@ -53,7 +52,7 @@ class VertxRxCircuitBreakerHttpServerTest extends VertxHttpServerTest {
}
result.setHandler {
if (it.failed()) {
throw it.cause();
throw it.cause()
}
HttpServerTest.ServerEndpoint endpoint = it.result()
controller(endpoint) {
@ -67,7 +66,7 @@ class VertxRxCircuitBreakerHttpServerTest extends VertxHttpServerTest {
}
result.setHandler {
if (it.failed()) {
throw it.cause();
throw it.cause()
}
HttpServerTest.ServerEndpoint endpoint = it.result()
controller(endpoint) {

View File

@ -76,7 +76,7 @@ abstract class HttpServerTest<DECORATOR extends HttpServerDecorator> extends Age
true
}
public enum ServerEndpoint {
enum ServerEndpoint {
SUCCESS("success", 200, "success"),
REDIRECT("redirect", 302, null),
ERROR("error", 500, "controller error"),
@ -96,11 +96,11 @@ abstract class HttpServerTest<DECORATOR extends HttpServerDecorator> extends Age
this.errored = status >= 500
}
public String getPath() {
String getPath() {
return "/$path"
}
public String rawPath() {
String rawPath() {
return path
}
@ -124,9 +124,8 @@ abstract class HttpServerTest<DECORATOR extends HttpServerDecorator> extends Age
static <T> T controller(ServerEndpoint endpoint, Closure<T> closure) {
if (endpoint == NOT_FOUND) {
return closure()
} else {
return runUnderTrace("controller", closure)
}
return runUnderTrace("controller", closure)
}
def "test success with #count requests"() {