diff --git a/.github/workflows/docker-ci.yaml b/.github/workflows/docker-ci.yaml new file mode 100644 index 000000000000..5b3f6dbeac76 --- /dev/null +++ b/.github/workflows/docker-ci.yaml @@ -0,0 +1,62 @@ +# 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: docker-ci + +on: [push, pull_request] +env: + SKIP_TEST: true + DOCKER_DIR: ./docker + LOG_DIR: /tmp/skywalking +jobs: + build: + runs-on: ubuntu-16.04 + steps: + - uses: actions/checkout@v1 + - uses: actions/cache@v1 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - name: Build docker image + run: make docker + - name: Bootstrap cluster + run: cd ${DOCKER_DIR} && docker-compose up -d + - name: Check port avaliable + run: | + source ./test/scripts/env.sh + echo "Waiting for OAP ready" + export PORT=11800 + check_sw_port + echo "OAP is ready" + echo "Waiting for UI ready" + PORT=8080 + check_sw_port + echo "UI is ready" + - name: Collect logs + run: | + mkdir -p ${LOG_DIR} + cd ${DOCKER_DIR} + docker-compose logs oap > ${LOG_DIR}/oap.txt + docker-compose logs ui > ${LOG_DIR}/ui.txt + docker-compose logs elasticsearch > ${LOG_DIR}/es.txt + continue-on-error: true + - uses: actions/upload-artifact@v1.0.0 + continue-on-error: true + with: + name: logs + path: /tmp/skywalking diff --git a/CHANGES.md b/CHANGES.md index 33fd35e304c9..21aa616bcce8 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -62,6 +62,7 @@ Release Notes. - BugFix: endpoint grouping rules may be not unique (#3510) - Add feature to control the maximum agent log files (#3475) - Agent support custom properties. (#3367) +- Add Light4j plugin (#3323) #### Document - Remove travis badge (#3763) diff --git a/Jenkinsfile-Agent-Test-2 b/Jenkinsfile-Agent-Test-2 index eb15e93e4799..0e15485bfe16 100755 --- a/Jenkinsfile-Agent-Test-2 +++ b/Jenkinsfile-Agent-Test-2 @@ -67,7 +67,7 @@ pipeline { sh './mvnw -f test/plugin/pom.xml clean package -DskipTests docker:build' } } - stage('Test Cases Report (146)') { + stage('Test Cases Report (170)') { steps { echo "Test Cases Report" } @@ -105,6 +105,12 @@ pipeline { sh 'bash test/plugin/run.sh dubbo-2.7.x-scenario' } } + + stage('okhttp 3.0.x-3.14.x (34)') { + steps { + sh 'bash test/plugin/run.sh okhttp-scenario' + } + } } } diff --git a/Jenkinsfile-Agent-Test-3 b/Jenkinsfile-Agent-Test-3 index f728c80f4fb3..9d500616232c 100755 --- a/Jenkinsfile-Agent-Test-3 +++ b/Jenkinsfile-Agent-Test-3 @@ -67,7 +67,7 @@ pipeline { sh './mvnw -f test/plugin/pom.xml clean package -DskipTests docker:build' } } - stage('Test Cases Report (160)') { + stage('Test Cases Report (161)') { steps { echo "Test Cases Report" } @@ -122,7 +122,7 @@ pipeline { } } - stage('grpc 1.0.0-1.9.0 (21)') { + stage('grpc 1.6.0-1.25.0 (22)') { steps { sh 'bash test/plugin/run.sh grpc-scenario' } diff --git a/LICENSE b/LICENSE index b17a69ab0c22..b3f1f516adb5 100644 --- a/LICENSE +++ b/LICENSE @@ -222,8 +222,8 @@ The text of each license is the standard Apache 2.0 license. proto files from lyft/protoc-gen-validate: https://github.com/lyft/protoc-gen-validate Apache 2.0 proto files from gogo/googleapis: https://github.com/gogo/googleapis Apache 2.0 mvnw files from https://github.com/takari/maven-wrapper Apache 2.0 - - + svg files from skywalking-ui/src/assets/icons: https://github.com/google/material-design-icons Apache 2.0 + ======================================================================== BSD licenses ======================================================================== diff --git a/Makefile b/Makefile index acb6a854dc76..2c3cc121a7a0 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +SHELL := /bin/bash -o pipefail export SW_ROOT := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) @@ -21,6 +22,9 @@ export SW_OUT:=${SW_ROOT}/dist SKIP_TEST?=false +init: + cd $(SW_ROOT) && git submodule update --init --recursive + .PHONY: build.all build.agent build.backend build.ui build.docker build.all: @@ -48,7 +52,7 @@ TAG?=latest .PHONY: docker docker.all docker.oap -docker: build.docker docker.all +docker: init build.docker docker.all DOCKER_TARGETS:=docker.oap docker.ui diff --git a/apm-dist/release-docs/LICENSE b/apm-dist/release-docs/LICENSE index 23d4ee0fd860..a977db849aba 100755 --- a/apm-dist/release-docs/LICENSE +++ b/apm-dist/release-docs/LICENSE @@ -423,7 +423,7 @@ lodash 4.17.15: https://github.com/lodash/lodash MIT Apache 2.0 licenses ======================================== echarts 4.1.0: https://github.com/apache/incubator-echarts Apache-2.0 - +Material Icons 3.0.1 https://github.com/google/material-design-icons Apache-2.0 ======================================== BSD licenses ======================================== diff --git a/docker/oap/Dockerfile.oap b/docker/oap/Dockerfile.oap index 43ec2ddb67e1..a94490e9be6f 100644 --- a/docker/oap/Dockerfile.oap +++ b/docker/oap/Dockerfile.oap @@ -34,6 +34,8 @@ WORKDIR skywalking COPY log4j2.xml config/ COPY docker-entrypoint.sh . +RUN mkdir ext-config; \ + mkdir ext-libs; EXPOSE 12800 11800 1234 diff --git a/docker/oap/docker-entrypoint.sh b/docker/oap/docker-entrypoint.sh index 2ae360748b9c..c18cd1aa8fed 100755 --- a/docker/oap/docker-entrypoint.sh +++ b/docker/oap/docker-entrypoint.sh @@ -425,7 +425,14 @@ SW_CLUSTER=${SW_CLUSTER:-standalone} SW_STORAGE=${SW_STORAGE:-h2} SW_CONFIGURATION=${SW_CONFIGURATION:-none} SW_TELEMETRY=${SW_TELEMETRY:-none} +EXT_LIB_DIR=/skywalking/ext-libs +EXT_CONFIG_DIR=/skywalking/ext-config +# If user wants to override application.yml, the one generated by docker-entrypoint.sh should be ignored. +[[ -f ${EXT_CONFIG_DIR}/application.yml ]] && SW_L0AD_CONFIG_FILE_FROM_VOLUME=true + +# Override configuration files +cp -vfR ${EXT_CONFIG_DIR}/ config/ if [[ -z "$SW_L0AD_CONFIG_FILE_FROM_VOLUME" ]] || [[ "$SW_L0AD_CONFIG_FILE_FROM_VOLUME" != "true" ]]; then generateApplicationYaml echo "Generated application.yml" @@ -439,6 +446,10 @@ for i in oap-libs/*.jar do CLASSPATH="$i:$CLASSPATH" done +for i in ${EXT_LIB_DIR}/*.jar +do + CLASSPATH="$i:$CLASSPATH" +done set -ex exec java -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap \ diff --git a/docs/en/guides/Plugin-test.md b/docs/en/guides/Plugin-test.md index eb7d04024c29..7b87dc823c8e 100644 --- a/docs/en/guides/Plugin-test.md +++ b/docs/en/guides/Plugin-test.md @@ -187,7 +187,7 @@ as the version number, it will be changed in the test for every version. **Take following test cases as examples** * [dubbo-2.7.x with JVM-container](../../../test/plugin/scenarios/dubbo-2.7.x-scenario/configuration.yml) -* [jetty with Tomcat-container](../../../test/plugin/scenarios/jetty-scenario/configuration.yml) +* [jetty with JVM-container](../../../test/plugin/scenarios/jetty-scenario/configuration.yml) * [gateway with runningMode](../../../test/plugin/scenarios/gateway-scenario/configuration.yml) * [canal with docker-compose](../../../test/plugin/scenarios/canal-scenario/configuration.yml) @@ -630,13 +630,14 @@ canal 1.0.24-1.1.2 | 5 | 214.05 ### Workload 2 -#### Group 1 (2906.54s) +#### Group 1 (3936.54s) scenario name | versions | elapsed time (sec) ---|---|--- spring-tx 4.x+ | 10 | 555.00 spring 4.3.x-5.2.x | 54 | 1769.32 dubbo 2.5.x-2.6.x | 10 | 367.23 dubbo 2.7.x | 4 | 214.99 +okhttp 3.0.x-3.14.x | 34 | 1030 #### Group 2 (2550.66s) scenario name | versions | elapsed time (sec) @@ -661,6 +662,7 @@ scenario name | versions | elapsed time (sec) ---|---|--- spring async 4.3.x-5.1.x | 35 | 967.70 mongodb 3.4.0-3.11.1 | 17 | 1465.63 +grcp 1.6.0-1.25.0 | 25 | 627.00 ### Workload 4 #### Group 1 (2463.00s) diff --git a/test/plugin/runner-helper/src/main/resources/docker-compose.template b/test/plugin/runner-helper/src/main/resources/docker-compose.template index fa928d19f913..f73097044d3b 100644 --- a/test/plugin/runner-helper/src/main/resources/docker-compose.template +++ b/test/plugin/runner-helper/src/main/resources/docker-compose.template @@ -38,7 +38,9 @@ services: - ${env} + <#if start_script??> - SCENARIO_START_SCRIPT=${start_script} + - SCENARIO_NAME=${scenario_name} - SCENARIO_VERSION=${scenario_version} - SCENARIO_ENTRY_SERVICE=${entry_service} diff --git a/test/plugin/scenarios/okhttp-scenario/bin/startup.sh b/test/plugin/scenarios/okhttp-scenario/bin/startup.sh new file mode 100644 index 000000000000..52b052cff51c --- /dev/null +++ b/test/plugin/scenarios/okhttp-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 -jar ${agent_opts} ${home}/../libs/okhttp-scenario.jar & \ No newline at end of file diff --git a/test/plugin/scenarios/okhttp-scenario/config/expectedData.yaml b/test/plugin/scenarios/okhttp-scenario/config/expectedData.yaml new file mode 100644 index 000000000000..48c46123810b --- /dev/null +++ b/test/plugin/scenarios/okhttp-scenario/config/expectedData.yaml @@ -0,0 +1,119 @@ +# 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: + - {okhttp-scenario: nq 0} + instances: + - {okhttp-scenario: 1} + operationNames: + - okhttp-scenario: [/case/receiveContext-0, /okhttp-case/case/receiveContext-0,/case/healthCheck, /case/okhttp-case, /case/receiveContext-1] + heartbeat: [] +segmentItems: +- applicationCode: okhttp-scenario + segmentSize: ge 5 + segments: + - segmentId: not null + spans: + - operationName: Async/okhttp-case/case/receiveContext-0 + operationId: 0 + parentSpanId: 0 + spanId: 1 + spanLayer: null + startTime: nq 0 + endTime: nq 0 + componentId: 0 + componentName: null + isError: false + spanType: Local + peer: null + peerId: 0 + - operationName: /case/okhttp-case + operationId: 0 + parentSpanId: -1 + spanId: 0 + spanLayer: Http + startTime: nq 0 + endTime: nq 0 + componentId: 14 + componentName: null + isError: false + spanType: Entry + peer: null + peerId: 0 + tags: + - {key: url, value: 'http://localhost:8080/okhttp-case/case/okhttp-case'} + - {key: http.method, value: GET} + - segmentId: not null + spans: + - operationName: /case/receiveContext-0 + operationId: 0 + parentSpanId: -1 + spanId: 0 + spanLayer: Http + startTime: nq 0 + endTime: nq 0 + componentId: 14 + componentName: null + isError: false + spanType: Entry + peer: null + peerId: 0 + tags: + - {key: url, value: 'http://127.0.0.1:8080/okhttp-case/case/receiveContext-0'} + - {key: http.method, value: GET} + refs: + - {parentEndpointId: 0, parentEndpoint: /okhttp-case/case/receiveContext-0, networkAddressId: 0, entryEndpointId: 0, refType: CrossProcess, parentSpanId: 0, parentTraceSegmentId: nq 0, parentServiceInstanceId: nq 0, networkAddress: '127.0.0.1:8080', entryEndpoint: /case/okhttp-case, entryServiceInstanceId: nq 0} + - segmentId: not null + spans: + - operationName: /case/receiveContext-1 + operationId: 0 + parentSpanId: -1 + spanId: 0 + spanLayer: Http + startTime: nq 0 + endTime: nq 0 + componentId: 14 + componentName: null + isError: false + spanType: Entry + peer: null + peerId: 0 + tags: + - {key: url, value: 'http://127.0.0.1:8080/okhttp-case/case/receiveContext-1'} + - {key: http.method, value: GET} + refs: + - {parentEndpointId: 0, parentEndpoint: /okhttp-case/case/receiveContext-0, networkAddressId: 0, entryEndpointId: 0, refType: CrossProcess, parentSpanId: 0, parentTraceSegmentId: nq 0, parentServiceInstanceId: nq 0, networkAddress: '127.0.0.1:8080', entryEndpoint: /case/okhttp-case, entryServiceInstanceId: nq 0} + - segmentId: not null + spans: + - operationName: /okhttp-case/case/receiveContext-0 + operationId: 0 + parentSpanId: -1 + spanId: 0 + spanLayer: Http + startTime: nq 0 + endTime: nq 0 + componentId: 12 + componentName: null + isError: false + spanType: Exit + peer: 127.0.0.1:8080 + peerId: 0 + tags: + - {key: http.method, value: GET} + - {key: url, value: 'http://127.0.0.1:8080/okhttp-case/case/receiveContext-0'} + refs: + - {parentEndpointId: 0, parentEndpoint: /case/okhttp-case, networkAddressId: 0, entryEndpointId: 0, refType: CrossThread, parentSpanId: 1, parentTraceSegmentId: nq 0, parentServiceInstanceId: nq 0, networkAddress: '', entryEndpoint: /case/okhttp-case, entryServiceInstanceId: nq 0} diff --git a/test/plugin/scenarios/okhttp-scenario/configuration.yml b/test/plugin/scenarios/okhttp-scenario/configuration.yml new file mode 100644 index 000000000000..fd67136a16bc --- /dev/null +++ b/test/plugin/scenarios/okhttp-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:8080/okhttp-case/case/okhttp-case +healthCheck: http://localhost:8080/okhttp-case/case/healthCheck +startScript: ./bin/startup.sh +framework: OKHttp3 \ No newline at end of file diff --git a/test/plugin/scenarios/okhttp-scenario/pom.xml b/test/plugin/scenarios/okhttp-scenario/pom.xml new file mode 100644 index 000000000000..d6863cc5d7b6 --- /dev/null +++ b/test/plugin/scenarios/okhttp-scenario/pom.xml @@ -0,0 +1,143 @@ + + + + 4.0.0 + + org.apache.skywalking + okhttp-scenario + 5.0.0 + + skywalking-okhttp-scenario + + + UTF-8 + + 3.0.0 + ${test.framework.version} + + 2.6.2 + 4.3.8.RELEASE + 1.5.2.RELEASE + + + + + com.squareup.okhttp3 + okhttp + ${test.framework.version} + + + + org.springframework.boot + spring-boot-starter + ${spring-boot-version} + + + org.apache.logging.log4j + log4j-api + ${log4j.version} + + + org.apache.logging.log4j + log4j-core + ${log4j.version} + + + org.apache.logging.log4j + log4j-slf4j-impl + ${log4j.version} + + + org.apache.logging.log4j + log4j-jcl + ${log4j.version} + + + org.springframework.boot + spring-boot-starter-tomcat + ${spring-boot-version} + + + org.springframework.boot + spring-boot-starter-web + ${spring-boot-version} + + + + + okhttp-scenario + + + org.apache.maven.plugins + maven-compiler-plugin + 3.6.0 + + 1.8 + 1.8 + ${project.build.sourceEncoding} + + + + org.springframework.boot + spring-boot-maven-plugin + 1.5.9.RELEASE + + + + repackage + + + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + assemble + package + + single + + + + src/main/assembly/assembly.xml + + ./target/ + + + + + + + + + + spring-snapshots + http://repo.spring.io/snapshot + + + spring-milestones + http://repo.spring.io/milestone + + + \ No newline at end of file diff --git a/test/plugin/scenarios/okhttp-scenario/src/main/assembly/assembly.xml b/test/plugin/scenarios/okhttp-scenario/src/main/assembly/assembly.xml new file mode 100644 index 000000000000..c34d25c39211 --- /dev/null +++ b/test/plugin/scenarios/okhttp-scenario/src/main/assembly/assembly.xml @@ -0,0 +1,41 @@ + + + + + zip + + + + + ./bin + 0775 + + + + + + ${project.build.directory}/okhttp-scenario.jar + ./libs + 0775 + + + diff --git a/test/plugin/scenarios/okhttp-scenario/src/main/java/test/apache/skywalking/testcase/okhttp/Application.java b/test/plugin/scenarios/okhttp-scenario/src/main/java/test/apache/skywalking/testcase/okhttp/Application.java new file mode 100644 index 000000000000..4f068862b6c8 --- /dev/null +++ b/test/plugin/scenarios/okhttp-scenario/src/main/java/test/apache/skywalking/testcase/okhttp/Application.java @@ -0,0 +1,39 @@ +/* + * 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 test.apache.skywalking.testcase.okhttp; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.EnableAutoConfiguration; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.web.support.SpringBootServletInitializer; +import org.springframework.context.annotation.ComponentScan; + +@EnableAutoConfiguration +@SpringBootApplication +@ComponentScan("test.apache.skywalking.testcase.okhttp") +public class Application extends SpringBootServletInitializer { + + public static void main(String[] args) { + try { + SpringApplication.run(Application.class, args); + } catch (Exception e) { + // Never do this + } + } +} diff --git a/test/plugin/scenarios/okhttp-scenario/src/main/java/test/apache/skywalking/testcase/okhttp/controller/CaseController.java b/test/plugin/scenarios/okhttp-scenario/src/main/java/test/apache/skywalking/testcase/okhttp/controller/CaseController.java new file mode 100644 index 000000000000..fa70392cf91e --- /dev/null +++ b/test/plugin/scenarios/okhttp-scenario/src/main/java/test/apache/skywalking/testcase/okhttp/controller/CaseController.java @@ -0,0 +1,76 @@ +/* + * 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 test.apache.skywalking.testcase.okhttp.controller; + +import java.io.IOException; +import okhttp3.Call; +import okhttp3.Callback; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +@Controller +@RequestMapping("/case") +public class CaseController { + + @RequestMapping("/receiveContext-1") + @ResponseBody + public String receiveContextService1() throws InterruptedException { + return "receiveContext-1"; + } + + @RequestMapping("/receiveContext-0") + @ResponseBody + public String receiveContextService0() throws InterruptedException { + return "receiveContext-0"; + } + + @RequestMapping("/okhttp-case") + @ResponseBody + public String okHttpScenario() { + Request request = new Request.Builder() + .url("http://127.0.0.1:8080/okhttp-case/case/receiveContext-0") + .build(); + + new OkHttpClient().newCall(request).enqueue(new Callback() { + @Override public void onFailure(Call call, IOException e) { + //Never do this + } + + @Override + public void onResponse(Call call, Response response) throws IOException { + Request request = new Request.Builder() + .url("http://127.0.0.1:8080/okhttp-case/case/receiveContext-1") + .build(); + new OkHttpClient().newCall(request).execute(); + } + }); + + return "Success"; + } + + @RequestMapping(value = "/healthCheck") + @ResponseBody + public String healthCheck() { + return "Success"; + } +} diff --git a/test/plugin/scenarios/okhttp-scenario/src/main/resources/application.properties b/test/plugin/scenarios/okhttp-scenario/src/main/resources/application.properties new file mode 100644 index 000000000000..b75d49c49db5 --- /dev/null +++ b/test/plugin/scenarios/okhttp-scenario/src/main/resources/application.properties @@ -0,0 +1,18 @@ +# 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. + +server.port=8080 +server.contextPath=/okhttp-case \ No newline at end of file diff --git a/test/plugin/scenarios/okhttp-scenario/src/main/resources/log4j2.xml b/test/plugin/scenarios/okhttp-scenario/src/main/resources/log4j2.xml new file mode 100644 index 000000000000..9849ed5a8abd --- /dev/null +++ b/test/plugin/scenarios/okhttp-scenario/src/main/resources/log4j2.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/plugin/scenarios/okhttp-scenario/support-version.list b/test/plugin/scenarios/okhttp-scenario/support-version.list new file mode 100644 index 000000000000..5f9ee143f5ab --- /dev/null +++ b/test/plugin/scenarios/okhttp-scenario/support-version.list @@ -0,0 +1,50 @@ +# 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. + +3.0.0 +3.0.1 +3.1.0 +3.1.1 +3.1.2 +3.2.0 +3.3.0 +3.3.1 +3.4.0 +3.4.1 +3.4.2 +3.5.0 +3.6.0 +3.7.0 +3.8.0 +3.8.1 +3.9.0 +3.9.1 +3.10.0 +3.11.0 +3.12.0 +3.12.1 +3.12.2 +3.12.3 +3.12.4 +3.12.5 +3.12.6 +3.13.0 +3.13.1 +3.14.0 +3.14.1 +3.14.2 +3.14.3 +3.14.4 \ No newline at end of file diff --git a/test/scripts/env.sh b/test/scripts/env.sh new file mode 100755 index 000000000000..a315a84b1122 --- /dev/null +++ b/test/scripts/env.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env 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. +# ---------------------------------------------------------------------------- + +function check_sw_port() { + for i in $(seq 1 15); do nc -zv -w 3 localhost ${PORT} && return || sleep 3; done; exit 1 +} \ No newline at end of file