From 4aac3293ca698898ee0bd1a0406c389d208ef759 Mon Sep 17 00:00:00 2001 From: Andy Ai Date: Thu, 26 Dec 2019 22:42:56 +0800 Subject: [PATCH] [test/plugin] immigrate test play framework scenario (#4128) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add play-scenario * Set play plugin as default Co-authored-by: 吴晟 Wu Sheng Co-authored-by: Weiyi Liu --- .github/workflows/plugins-test.yaml | 6 +- .../play-2.x-plugin/pom.xml | 3 +- .../play/v2x/HttpFiltersInterceptor.java | 0 .../apm/plugin/play/v2x/TracingFilter.java | 0 .../v2x/define/Play2xInstrumentation.java | 0 .../src/main/resources/skywalking-plugin.def | 0 .../play/v2x/HttpFiltersInterceptorTest.java | 0 .../play/v2x/Play2xInstrumentationTest.java | 0 .../plugin/play/v2x/TracingFilterTest.java | 0 apm-sniffer/apm-sdk-plugin/pom.xml | 1 + apm-sniffer/optional-plugins/pom.xml | 1 - .../setup/service-agent/java-agent/README.md | 1 - .../java-agent/Supported-list.md | 2 +- .../controllers/HealthCheckController.scala | 30 ++++ .../app/controllers/ProjectsController.scala | 30 ++++ .../scenarios/play-scenario/bin/startup.sh | 21 +++ test/plugin/scenarios/play-scenario/build.sbt | 31 ++++ .../play-scenario/conf/application.conf | 19 +++ .../scenarios/play-scenario/conf/logback.xml | 41 +++++ .../scenarios/play-scenario/conf/routes | 24 +++ .../play-scenario/config/expectedData.yaml | 44 ++++++ .../scenarios/play-scenario/configuration.yml | 21 +++ test/plugin/scenarios/play-scenario/pom.xml | 141 ++++++++++++++++++ .../play-scenario/project/build.properties | 17 +++ .../play-scenario/project/plugins.sbt | 19 +++ .../src/main/assembly/assembly.xml | 47 ++++++ .../play-scenario/support-version.list | 29 ++++ 27 files changed, 521 insertions(+), 7 deletions(-) rename apm-sniffer/{optional-plugins => apm-sdk-plugin}/play-2.x-plugin/pom.xml (94%) rename apm-sniffer/{optional-plugins => apm-sdk-plugin}/play-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/play/v2x/HttpFiltersInterceptor.java (100%) rename apm-sniffer/{optional-plugins => apm-sdk-plugin}/play-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/play/v2x/TracingFilter.java (100%) rename apm-sniffer/{optional-plugins => apm-sdk-plugin}/play-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/play/v2x/define/Play2xInstrumentation.java (100%) rename apm-sniffer/{optional-plugins => apm-sdk-plugin}/play-2.x-plugin/src/main/resources/skywalking-plugin.def (100%) rename apm-sniffer/{optional-plugins => apm-sdk-plugin}/play-2.x-plugin/src/test/java/org/apache/skywalking/apm/plugin/play/v2x/HttpFiltersInterceptorTest.java (100%) rename apm-sniffer/{optional-plugins => apm-sdk-plugin}/play-2.x-plugin/src/test/java/org/apache/skywalking/apm/plugin/play/v2x/Play2xInstrumentationTest.java (100%) rename apm-sniffer/{optional-plugins => apm-sdk-plugin}/play-2.x-plugin/src/test/java/org/apache/skywalking/apm/plugin/play/v2x/TracingFilterTest.java (100%) create mode 100644 test/plugin/scenarios/play-scenario/app/controllers/HealthCheckController.scala create mode 100644 test/plugin/scenarios/play-scenario/app/controllers/ProjectsController.scala create mode 100644 test/plugin/scenarios/play-scenario/bin/startup.sh create mode 100644 test/plugin/scenarios/play-scenario/build.sbt create mode 100644 test/plugin/scenarios/play-scenario/conf/application.conf create mode 100644 test/plugin/scenarios/play-scenario/conf/logback.xml create mode 100644 test/plugin/scenarios/play-scenario/conf/routes create mode 100644 test/plugin/scenarios/play-scenario/config/expectedData.yaml create mode 100644 test/plugin/scenarios/play-scenario/configuration.yml create mode 100644 test/plugin/scenarios/play-scenario/pom.xml create mode 100644 test/plugin/scenarios/play-scenario/project/build.properties create mode 100644 test/plugin/scenarios/play-scenario/project/plugins.sbt create mode 100644 test/plugin/scenarios/play-scenario/src/main/assembly/assembly.xml create mode 100644 test/plugin/scenarios/play-scenario/support-version.list diff --git a/.github/workflows/plugins-test.yaml b/.github/workflows/plugins-test.yaml index b5d286b6e..b746617ec 100644 --- a/.github/workflows/plugins-test.yaml +++ b/.github/workflows/plugins-test.yaml @@ -517,7 +517,7 @@ jobs: - name: Run mysql 5.1.2-8.0.15 (53) run: bash test/plugin/run.sh mysql-scenario - LETTUCE: + LETTUCE_PlayFramework: runs-on: ubuntu-18.04 timeout-minutes: 90 strategy: @@ -540,4 +540,6 @@ jobs: - name: Build the Docker image run: ./mvnw -f test/plugin/pom.xml clean package -DskipTests docker:build -DBUILD_NO=local >/dev/null - name: Run lettuce-scenario 5.x (17) - run: bash test/plugin/run.sh lettuce-scenario \ No newline at end of file + run: bash test/plugin/run.sh lettuce-scenario + - name: Run Play! Framework + run: bash test/plugin/run.sh play-scenario diff --git a/apm-sniffer/optional-plugins/play-2.x-plugin/pom.xml b/apm-sniffer/apm-sdk-plugin/play-2.x-plugin/pom.xml similarity index 94% rename from apm-sniffer/optional-plugins/play-2.x-plugin/pom.xml rename to apm-sniffer/apm-sdk-plugin/play-2.x-plugin/pom.xml index 49f47df9e..c8d40a81c 100644 --- a/apm-sniffer/optional-plugins/play-2.x-plugin/pom.xml +++ b/apm-sniffer/apm-sdk-plugin/play-2.x-plugin/pom.xml @@ -20,8 +20,8 @@ 4.0.0 + apm-sdk-plugin org.apache.skywalking - optional-plugins 7.0.0-SNAPSHOT @@ -32,7 +32,6 @@ UTF-8 2.7.3 - 1.8 diff --git a/apm-sniffer/optional-plugins/play-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/play/v2x/HttpFiltersInterceptor.java b/apm-sniffer/apm-sdk-plugin/play-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/play/v2x/HttpFiltersInterceptor.java similarity index 100% rename from apm-sniffer/optional-plugins/play-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/play/v2x/HttpFiltersInterceptor.java rename to apm-sniffer/apm-sdk-plugin/play-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/play/v2x/HttpFiltersInterceptor.java diff --git a/apm-sniffer/optional-plugins/play-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/play/v2x/TracingFilter.java b/apm-sniffer/apm-sdk-plugin/play-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/play/v2x/TracingFilter.java similarity index 100% rename from apm-sniffer/optional-plugins/play-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/play/v2x/TracingFilter.java rename to apm-sniffer/apm-sdk-plugin/play-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/play/v2x/TracingFilter.java diff --git a/apm-sniffer/optional-plugins/play-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/play/v2x/define/Play2xInstrumentation.java b/apm-sniffer/apm-sdk-plugin/play-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/play/v2x/define/Play2xInstrumentation.java similarity index 100% rename from apm-sniffer/optional-plugins/play-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/play/v2x/define/Play2xInstrumentation.java rename to apm-sniffer/apm-sdk-plugin/play-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/play/v2x/define/Play2xInstrumentation.java diff --git a/apm-sniffer/optional-plugins/play-2.x-plugin/src/main/resources/skywalking-plugin.def b/apm-sniffer/apm-sdk-plugin/play-2.x-plugin/src/main/resources/skywalking-plugin.def similarity index 100% rename from apm-sniffer/optional-plugins/play-2.x-plugin/src/main/resources/skywalking-plugin.def rename to apm-sniffer/apm-sdk-plugin/play-2.x-plugin/src/main/resources/skywalking-plugin.def diff --git a/apm-sniffer/optional-plugins/play-2.x-plugin/src/test/java/org/apache/skywalking/apm/plugin/play/v2x/HttpFiltersInterceptorTest.java b/apm-sniffer/apm-sdk-plugin/play-2.x-plugin/src/test/java/org/apache/skywalking/apm/plugin/play/v2x/HttpFiltersInterceptorTest.java similarity index 100% rename from apm-sniffer/optional-plugins/play-2.x-plugin/src/test/java/org/apache/skywalking/apm/plugin/play/v2x/HttpFiltersInterceptorTest.java rename to apm-sniffer/apm-sdk-plugin/play-2.x-plugin/src/test/java/org/apache/skywalking/apm/plugin/play/v2x/HttpFiltersInterceptorTest.java diff --git a/apm-sniffer/optional-plugins/play-2.x-plugin/src/test/java/org/apache/skywalking/apm/plugin/play/v2x/Play2xInstrumentationTest.java b/apm-sniffer/apm-sdk-plugin/play-2.x-plugin/src/test/java/org/apache/skywalking/apm/plugin/play/v2x/Play2xInstrumentationTest.java similarity index 100% rename from apm-sniffer/optional-plugins/play-2.x-plugin/src/test/java/org/apache/skywalking/apm/plugin/play/v2x/Play2xInstrumentationTest.java rename to apm-sniffer/apm-sdk-plugin/play-2.x-plugin/src/test/java/org/apache/skywalking/apm/plugin/play/v2x/Play2xInstrumentationTest.java diff --git a/apm-sniffer/optional-plugins/play-2.x-plugin/src/test/java/org/apache/skywalking/apm/plugin/play/v2x/TracingFilterTest.java b/apm-sniffer/apm-sdk-plugin/play-2.x-plugin/src/test/java/org/apache/skywalking/apm/plugin/play/v2x/TracingFilterTest.java similarity index 100% rename from apm-sniffer/optional-plugins/play-2.x-plugin/src/test/java/org/apache/skywalking/apm/plugin/play/v2x/TracingFilterTest.java rename to apm-sniffer/apm-sdk-plugin/play-2.x-plugin/src/test/java/org/apache/skywalking/apm/plugin/play/v2x/TracingFilterTest.java diff --git a/apm-sniffer/apm-sdk-plugin/pom.xml b/apm-sniffer/apm-sdk-plugin/pom.xml index 8c399b7be..411479d2b 100644 --- a/apm-sniffer/apm-sdk-plugin/pom.xml +++ b/apm-sniffer/apm-sdk-plugin/pom.xml @@ -83,6 +83,7 @@ armeria-0.84.x-plugin armeria-0.85.x-plugin httpclient-3.x-plugin + play-2.x-plugin lettuce-5.x-plugin pom diff --git a/apm-sniffer/optional-plugins/pom.xml b/apm-sniffer/optional-plugins/pom.xml index 193ccfb6e..c8534f92a 100644 --- a/apm-sniffer/optional-plugins/pom.xml +++ b/apm-sniffer/optional-plugins/pom.xml @@ -46,7 +46,6 @@ gson-2.8.x-plugin zookeeper-3.4.x-plugin customize-enhance-plugin - play-2.x-plugin diff --git a/docs/en/setup/service-agent/java-agent/README.md b/docs/en/setup/service-agent/java-agent/README.md index f237c2c11..abae8b85f 100755 --- a/docs/en/setup/service-agent/java-agent/README.md +++ b/docs/en/setup/service-agent/java-agent/README.md @@ -131,7 +131,6 @@ Now, we have the following known optional plugins. * Plugin of Zookeeper 3.4.x in optional plugin folder. The reason of being optional plugin is, many business irrelevant traces are generated, which cause extra payload to agents and backends. At the same time, those traces may be just heartbeat(s). * [Customize enhance](Customize-enhance-trace.md) Trace methods based on description files, rather than write plugin or change source codes. * Plugin of Spring Cloud Gateway 2.1.x in optional plugin folder. Please only active this plugin when you install agent in Spring Gateway. spring-cloud-gateway-2.x-plugin and spring-webflux-5.x-plugin are both required. -* Plugin of [Play Framework](https://www.playframework.com/) 2.6+ (JDK 1.8 required & Scala 2.12/2.13) in optional plugin folder. Please only active this plugin when you install agent in [Play Framework](https://www.playframework.com/). * Plugin of Spring Transaction in optional plugin folder. The reason of being optional plugin is, many local span are generated, which also spend more CPU, memory and network. ## Bootstrap class plugins diff --git a/docs/en/setup/service-agent/java-agent/Supported-list.md b/docs/en/setup/service-agent/java-agent/Supported-list.md index 6490c3055..794e5b3ba 100644 --- a/docs/en/setup/service-agent/java-agent/Supported-list.md +++ b/docs/en/setup/service-agent/java-agent/Supported-list.md @@ -12,7 +12,7 @@ * [Spring WebFlux](https://docs.spring.io/spring/docs/current/spring-framework-reference/web-reactive.html) 5.x * [Undertow](http://undertow.io/) 1.3.0.Final -> 2.0.27.Final * [RESTEasy](https://resteasy.github.io/) 3.1.0.Final -> 3.7.0.Final - * [Play Framework](https://www.playframework.com/) 2.6.x -> 2.7.x (Optional²) + * [Play Framework](https://www.playframework.com/) 2.6.x -> 2.8.x * [Light4J Microservices Framework](https://doc.networknt.com/) 1.6.x -> 2.x * [Netty SocketIO](https://github.com/mrniko/netty-socketio) 1.x * HTTP Client diff --git a/test/plugin/scenarios/play-scenario/app/controllers/HealthCheckController.scala b/test/plugin/scenarios/play-scenario/app/controllers/HealthCheckController.scala new file mode 100644 index 000000000..718276922 --- /dev/null +++ b/test/plugin/scenarios/play-scenario/app/controllers/HealthCheckController.scala @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package controllers + +import javax.inject._ +import play.api.mvc._ + +@Singleton +class HealthCheckController @Inject()(cc: ControllerComponents) extends AbstractController(cc) { + + def get: Action[AnyContent] = Action { implicit request: Request[AnyContent] => + Ok("imok") + } + +} diff --git a/test/plugin/scenarios/play-scenario/app/controllers/ProjectsController.scala b/test/plugin/scenarios/play-scenario/app/controllers/ProjectsController.scala new file mode 100644 index 000000000..53dc440e5 --- /dev/null +++ b/test/plugin/scenarios/play-scenario/app/controllers/ProjectsController.scala @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package controllers + +import javax.inject._ +import play.api.mvc._ + +@Singleton +class ProjectsController @Inject()(cc: ControllerComponents) extends AbstractController(cc) { + + def get(projectId: Int): Action[AnyContent] = Action { implicit request: Request[AnyContent] => + Ok(s"Project id: $projectId") + } + +} diff --git a/test/plugin/scenarios/play-scenario/bin/startup.sh b/test/plugin/scenarios/play-scenario/bin/startup.sh new file mode 100644 index 000000000..c8b71d5e5 --- /dev/null +++ b/test/plugin/scenarios/play-scenario/bin/startup.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +home="$(cd "$(dirname $0)"; pwd)" + +java -cp "${home}/../libs/*" ${agent_opts} play.core.server.ProdServerStart & diff --git a/test/plugin/scenarios/play-scenario/build.sbt b/test/plugin/scenarios/play-scenario/build.sbt new file mode 100644 index 000000000..6261a2165 --- /dev/null +++ b/test/plugin/scenarios/play-scenario/build.sbt @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +name := """play-scenario""" + +organization := "org.apache.skywalking" + +version := "1.0-SNAPSHOT" + +lazy val root = (project in file(".")).enablePlugins(PlayScala) + +scalaVersion := "2.13.1" + +libraryDependencies += guice + +maintainer := "yanbo.ai@gmail.com" diff --git a/test/plugin/scenarios/play-scenario/conf/application.conf b/test/plugin/scenarios/play-scenario/conf/application.conf new file mode 100644 index 000000000..9437cb6e0 --- /dev/null +++ b/test/plugin/scenarios/play-scenario/conf/application.conf @@ -0,0 +1,19 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# https://www.playframework.com/documentation/latest/Configuration + +play.http.secret.key = "QCY?tAnfk?aZ?iwrNwnxIlR6CTf:G3gf:90Latabg@5241AB`R5W:1uDFN];Ik@n" diff --git a/test/plugin/scenarios/play-scenario/conf/logback.xml b/test/plugin/scenarios/play-scenario/conf/logback.xml new file mode 100644 index 000000000..96ec52ddf --- /dev/null +++ b/test/plugin/scenarios/play-scenario/conf/logback.xml @@ -0,0 +1,41 @@ + + + + + + + + + + %coloredLevel %logger{15} - %message%n%xException{10} + + + + + + + + + + + + + + + diff --git a/test/plugin/scenarios/play-scenario/conf/routes b/test/plugin/scenarios/play-scenario/conf/routes new file mode 100644 index 000000000..8ecc28d9b --- /dev/null +++ b/test/plugin/scenarios/play-scenario/conf/routes @@ -0,0 +1,24 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Routes +# This file defines all application routes (Higher priority routes first) +# https://www.playframework.com/documentation/latest/ScalaRouting +# ~~~~ + +# An example controller showing a sample home page +GET /play-scenario/case/healthCheck controllers.HealthCheckController.get +GET /play-scenario/case/play-scenario/projects/:projectId controllers.ProjectsController.get(projectId: Int) diff --git a/test/plugin/scenarios/play-scenario/config/expectedData.yaml b/test/plugin/scenarios/play-scenario/config/expectedData.yaml new file mode 100644 index 000000000..1ee937227 --- /dev/null +++ b/test/plugin/scenarios/play-scenario/config/expectedData.yaml @@ -0,0 +1,44 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +registryItems: + applications: + - {play-scenario: 2} + instances: + - {play-scenario: 1} + operationNames: + - play-scenario: ["/play-scenario/case/play-scenario/projects/{projectId}"] +segmentItems: + - applicationCode: play-scenario + segmentSize: gt 1 + segments: + - segmentId: not null + spans: + - operationName: "/play-scenario/case/play-scenario/projects/{projectId}" + operationId: 0 + parentSpanId: -1 + spanId: 0 + spanLayer: Http + startTime: nq 0 + endTime: nq 0 + componentId: 68 + componentName: '' + isError: false + spanType: Entry + peer: '' + peerId: 0 + tags: + - {key: url, value: 'localhost:9000/play-scenario/case/play-scenario/projects/1'} + - {key: http.method, value: GET} diff --git a/test/plugin/scenarios/play-scenario/configuration.yml b/test/plugin/scenarios/play-scenario/configuration.yml new file mode 100644 index 000000000..939ff6367 --- /dev/null +++ b/test/plugin/scenarios/play-scenario/configuration.yml @@ -0,0 +1,21 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +type: jvm +entryService: http://localhost:9000/play-scenario/case/play-scenario/projects/1 +healthCheck: http://localhost:9000/play-scenario/case/healthCheck +startScript: ./bin/startup.sh +framework: PlayFramework diff --git a/test/plugin/scenarios/play-scenario/pom.xml b/test/plugin/scenarios/play-scenario/pom.xml new file mode 100644 index 000000000..6d71a9cbf --- /dev/null +++ b/test/plugin/scenarios/play-scenario/pom.xml @@ -0,0 +1,141 @@ + + + + + org.apache.skywalking.apm.testcase + play-scenario + 1.0.0 + play2 + + 4.0.0 + + + UTF-8 + 1.8 + 2.12.9 + 2.8.0 + ${test.framework.version} + + + Play! Framework Scenario + + + + org.scala-lang + scala-library + ${scala.version} + + + + com.typesafe.play + play_2.12 + ${test.framework.version} + + + + com.typesafe.play + play-guice_2.12 + ${test.framework.version} + + + + com.typesafe.play + play-logback_2.12 + ${test.framework.version} + runtime + + + + com.typesafe.play + play-akka-http-server_2.12 + ${test.framework.version} + runtime + + + + + play-scenario + ${project.basedir}/app + ${project.basedir}/test + + + ${project.basedir}/conf + + + + + com.google.code.play2-maven-plugin + play2-maven-plugin + 1.0.0-rc5 + true + + + + com.google.code.sbt-compiler-maven-plugin + sbt-compiler-maven-plugin + 1.0.0 + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory}/libs + + + + + + + maven-compiler-plugin + + ${compiler.version} + ${compiler.version} + ${project.build.sourceEncoding} + + + + org.apache.maven.plugins + maven-assembly-plugin + + + assemble + package + + single + + + + src/main/assembly/assembly.xml + + ./target/ + + + + + + + \ No newline at end of file diff --git a/test/plugin/scenarios/play-scenario/project/build.properties b/test/plugin/scenarios/play-scenario/project/build.properties new file mode 100644 index 000000000..a6a751a2b --- /dev/null +++ b/test/plugin/scenarios/play-scenario/project/build.properties @@ -0,0 +1,17 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +sbt.version=1.3.5 diff --git a/test/plugin/scenarios/play-scenario/project/plugins.sbt b/test/plugin/scenarios/play-scenario/project/plugins.sbt new file mode 100644 index 000000000..0642ef7e3 --- /dev/null +++ b/test/plugin/scenarios/play-scenario/project/plugins.sbt @@ -0,0 +1,19 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.8.0") diff --git a/test/plugin/scenarios/play-scenario/src/main/assembly/assembly.xml b/test/plugin/scenarios/play-scenario/src/main/assembly/assembly.xml new file mode 100644 index 000000000..630e18bd1 --- /dev/null +++ b/test/plugin/scenarios/play-scenario/src/main/assembly/assembly.xml @@ -0,0 +1,47 @@ + + + + + zip + + + + + ./bin + 0775 + + + ${project.build.directory}/libs + ./libs + 0775 + + + + + + ${project.build.directory}/play-scenario.jar + ./libs + 0775 + + + + diff --git a/test/plugin/scenarios/play-scenario/support-version.list b/test/plugin/scenarios/play-scenario/support-version.list new file mode 100644 index 000000000..95261c594 --- /dev/null +++ b/test/plugin/scenarios/play-scenario/support-version.list @@ -0,0 +1,29 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# lists your version here +2.6.0 +2.6.5 +2.6.10 +2.6.15 +2.6.20 +2.6.25 +2.7.0 +2.7.1 +2.7.2 +2.7.3 +2.7.4 +2.8.0