-
Notifications
You must be signed in to change notification settings - Fork 878
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert some ratpack tests to java (#12825)
- Loading branch information
Showing
40 changed files
with
1,092 additions
and
1,076 deletions.
There are no files selected for viewing
22 changes: 0 additions & 22 deletions
22
...on/ratpack/ratpack-1.4/javaagent/src/test/groovy/server/RatpackAsyncHttpServerTest.groovy
This file was deleted.
Oops, something went wrong.
27 changes: 0 additions & 27 deletions
27
...n/ratpack/ratpack-1.4/javaagent/src/test/groovy/server/RatpackForkedHttpServerTest.groovy
This file was deleted.
Oops, something went wrong.
23 changes: 0 additions & 23 deletions
23
...ntation/ratpack/ratpack-1.4/javaagent/src/test/groovy/server/RatpackHttpServerTest.groovy
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
...rumentation/ratpack/ratpack-1.4/javaagent/src/test/groovy/server/RatpackRoutesTest.groovy
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...io/opentelemetry/javaagent/instrumentation/ratpack/server/RatpackAsyncHttpServerTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package io.opentelemetry.javaagent.instrumentation.ratpack.server; | ||
|
||
import io.opentelemetry.instrumentation.ratpack.server.AbstractRatpackAsyncHttpServerTest; | ||
import io.opentelemetry.instrumentation.testing.junit.InstrumentationExtension; | ||
import io.opentelemetry.instrumentation.testing.junit.http.HttpServerInstrumentationExtension; | ||
import io.opentelemetry.instrumentation.testing.junit.http.HttpServerTestOptions; | ||
import org.junit.jupiter.api.extension.RegisterExtension; | ||
import ratpack.server.RatpackServerSpec; | ||
|
||
class RatpackAsyncHttpServerTest extends AbstractRatpackAsyncHttpServerTest { | ||
|
||
@RegisterExtension | ||
public static final InstrumentationExtension testing = | ||
HttpServerInstrumentationExtension.forAgent(); | ||
|
||
@Override | ||
protected void configure(RatpackServerSpec serverSpec) {} | ||
|
||
@Override | ||
protected void configure(HttpServerTestOptions options) { | ||
super.configure(options); | ||
|
||
options.setHasResponseCustomizer(endpoint -> true); | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
...o/opentelemetry/javaagent/instrumentation/ratpack/server/RatpackForkedHttpServerTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package io.opentelemetry.javaagent.instrumentation.ratpack.server; | ||
|
||
import io.opentelemetry.instrumentation.ratpack.server.AbstractRatpackForkedHttpServerTest; | ||
import io.opentelemetry.instrumentation.testing.junit.InstrumentationExtension; | ||
import io.opentelemetry.instrumentation.testing.junit.http.HttpServerInstrumentationExtension; | ||
import io.opentelemetry.instrumentation.testing.junit.http.HttpServerTestOptions; | ||
import org.junit.jupiter.api.extension.RegisterExtension; | ||
import ratpack.server.RatpackServerSpec; | ||
|
||
class RatpackForkedHttpServerTest extends AbstractRatpackForkedHttpServerTest { | ||
|
||
@RegisterExtension | ||
public static final InstrumentationExtension testing = | ||
HttpServerInstrumentationExtension.forAgent(); | ||
|
||
@Override | ||
protected void configure(RatpackServerSpec serverSpec) {} | ||
|
||
@Override | ||
protected void configure(HttpServerTestOptions options) { | ||
super.configure(options); | ||
|
||
options.setHasResponseCustomizer(endpoint -> true); | ||
options.setTestHttpPipelining(false); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
...java/io/opentelemetry/javaagent/instrumentation/ratpack/server/RatpackHttpServerTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package io.opentelemetry.javaagent.instrumentation.ratpack.server; | ||
|
||
import io.opentelemetry.instrumentation.ratpack.server.AbstractRatpackHttpServerTest; | ||
import io.opentelemetry.instrumentation.testing.junit.InstrumentationExtension; | ||
import io.opentelemetry.instrumentation.testing.junit.http.HttpServerInstrumentationExtension; | ||
import io.opentelemetry.instrumentation.testing.junit.http.HttpServerTestOptions; | ||
import org.junit.jupiter.api.extension.RegisterExtension; | ||
import ratpack.server.RatpackServerSpec; | ||
|
||
class RatpackHttpServerTest extends AbstractRatpackHttpServerTest { | ||
|
||
@RegisterExtension | ||
public static final InstrumentationExtension testing = | ||
HttpServerInstrumentationExtension.forAgent(); | ||
|
||
@Override | ||
protected void configure(RatpackServerSpec serverSpec) {} | ||
|
||
@Override | ||
protected void configure(HttpServerTestOptions options) { | ||
super.configure(options); | ||
|
||
options.setHasResponseCustomizer(endpoint -> true); | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
...est/java/io/opentelemetry/javaagent/instrumentation/ratpack/server/RatpackRoutesTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package io.opentelemetry.javaagent.instrumentation.ratpack.server; | ||
|
||
import io.opentelemetry.instrumentation.ratpack.server.AbstractRatpackRoutesTest; | ||
import io.opentelemetry.instrumentation.testing.junit.AgentInstrumentationExtension; | ||
import io.opentelemetry.instrumentation.testing.junit.InstrumentationExtension; | ||
import org.junit.jupiter.api.extension.RegisterExtension; | ||
import ratpack.server.RatpackServerSpec; | ||
|
||
class RatpackRoutesTest extends AbstractRatpackRoutesTest { | ||
|
||
@RegisterExtension | ||
static final InstrumentationExtension testing = AgentInstrumentationExtension.create(); | ||
|
||
@Override | ||
protected InstrumentationExtension testing() { | ||
return testing; | ||
} | ||
|
||
@Override | ||
protected void configure(RatpackServerSpec serverSpec) {} | ||
|
||
@Override | ||
protected boolean hasHandlerSpan() { | ||
return true; | ||
} | ||
} |
142 changes: 0 additions & 142 deletions
142
...io/opentelemetry/instrumentation/ratpack/server/AbstractRatpackAsyncHttpServerTest.groovy
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.