Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
wu-sheng committed Oct 20, 2019
2 parents 23724c9 + aa18eb6 commit 2c56cad
Show file tree
Hide file tree
Showing 38 changed files with 1,899 additions and 9 deletions.
19 changes: 12 additions & 7 deletions Jenkinsfile-Agent-Test
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ pipeline {
sh './mvnw -f test/plugin/pom.xml clean package -DskipTests -Dbuild_id=${BUILD_ID} docker:build'
}
}
stage('Test Cases Report (139)') {
steps {
echo "reserve."
}
}
stage('Run Agent Plugin Tests') {
parallel {
stage('Group1') {
Expand All @@ -76,17 +81,17 @@ pipeline {
}
}

stage('netty-socketio 1.x (4)') {
steps {
sh 'bash test/plugin/run.sh --build_id=${BUILD_ID} netty-socketio-scenario'
}
}

stage('spring async 4.3.x-5.1.x (35)'){
steps{
sh 'bash test/plugin/run.sh --build_id=${BUILD_ID} spring-async-scenario'
}
}

stage('netty-socketio 1.x (4)') {
steps {
sh 'bash test/plugin/run.sh --build_id=${BUILD_ID} netty-socketio-scenario'
}
}
}
}
stage('Group2') {
Expand All @@ -108,4 +113,4 @@ pipeline {
deleteDir()
}
}
}
}
5 changes: 5 additions & 0 deletions Jenkinsfile-Agent-Test-2
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ pipeline {
sh './mvnw -f test/plugin/pom.xml clean package -DskipTests -Dbuild_id=${BUILD_ID} docker:build'
}
}
stage('Test Cases Report (132)') {
steps {
echo "reserve."
}
}
stage('Run Agent Plugin Tests') {
parallel {
stage('Group1') {
Expand Down
19 changes: 17 additions & 2 deletions Jenkinsfile-Agent-Test-3
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ pipeline {
sh './mvnw -f test/plugin/pom.xml clean package -DskipTests -Dbuild_id=${BUILD_ID} docker:build'
}
}
stage('Test Cases Report (73)') {
steps {
echo "reserve."
}
}
stage('Run Agent Plugin Tests') {
parallel {
stage('Group1') {
Expand All @@ -63,13 +68,23 @@ pipeline {
sh 'bash test/plugin/run.sh --build_id=${BUILD_ID} kafka-scenario'
}
}
stage('canal 1.0.24-1.1.2 (5)') {
steps {
sh 'bash test/plugin/run.sh --build_id=${BUILD_ID} canal-scenario'
}
}
}
}
stage('Group2') {
stages {
stage('reserve stages') {
stage('postgresql 9.2.x-9.4.x (36)') {
steps {
sh 'bash test/plugin/run.sh --build_id=${BUILD_ID} postgresql-scenario'
}
}
stage('postgresql-9.4.1207+ (16)') {
steps {
echo "reserve."
sh 'bash test/plugin/run.sh --build_id=${BUILD_ID} postgresql-above9.4.1207-scenario'
}
}
}
Expand Down
21 changes: 21 additions & 0 deletions test/plugin/scenarios/canal-scenario/bin/startup.sh
Original file line number Diff line number Diff line change
@@ -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 -Dcanal.host=${CANAL_HOST} -Dcanal.port=${CANAL_PORT} -jar ${agent_opts} ${home}/../libs/canal-scenario.jar &
66 changes: 66 additions & 0 deletions test/plugin/scenarios/canal-scenario/config/expectedData.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# 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:
- {canal-scenario: 2}
instances:
- {canal-scenario: 1}
operationNames:
- canal-scenario: [Canal/example, /canal-scenario/case/canal-case]
heartbeat: []
segmentItems:
- applicationCode: canal-scenario
segmentSize: gt 1
segments:
- segmentId: not null
spans:
- operationName: Canal/example
operationId: 0
parentSpanId: 0
spanId: 1
spanLayer: Unknown
startTime: nq 0
endTime: nq 0
componentId: 54
componentName: ''
isError: false
spanType: Exit
peer: not null
peerId: 0
tags:
- {key: batchSize, value: '1000'}
- {key: destination, value: example}
- operationName: /canal-scenario/case/canal-case
operationId: 0
parentSpanId: -1
spanId: 0
spanLayer: Http
startTime: nq 0
endTime: nq 0
componentId: 1
componentName: ''
isError: false
spanType: Entry
peer: ''
peerId: 0
tags:
- {key: url, value: 'http://localhost:8080/canal-scenario/case/canal-case'}
- {key: http.method, value: GET}





43 changes: 43 additions & 0 deletions test/plugin/scenarios/canal-scenario/configuration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# 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/canal-scenario/case/canal-case
healthCheck: http://localhost:8080/canal-scenario/case/healthCheck
startScript: ./bin/startup.sh
framework: canal
environment:
- CANAL_HOST=canal-server
- CANAL_PORT=11111
depends_on:
- mysql
- canal-server
dependencies:
mysql:
image: mysql:5.7
hostname: mysql
environment:
- MYSQL_ROOT_PASSWORD=000000
canal-server:
image: canal/canal-server:v1.1.0
hostname: canal-server
environment:
- canal.instance.master.address=mysql:3306
- canal.instance.master.journal.name=mysql-bin.000001
- canal.instance.dbUsername=root
- canal.instance.dbPassword=000000
depends_on:
- mysql
168 changes: 168 additions & 0 deletions test/plugin/scenarios/canal-scenario/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ 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.
~
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>org.apache.skywalking</groupId>
<artifactId>canal-scenario</artifactId>
<version>5.0.0</version>

<name>skywalking-canal-scenario</name>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<test.framework.version>1.1.2</test.framework.version>
<compiler.version>1.8</compiler.version>

<log4j.version>2.6.2</log4j.version>
<spring.version>4.3.8.RELEASE</spring.version>
<spring-boot-version>1.5.2.RELEASE</spring-boot-version>
</properties>

<dependencies>
<dependency>
<groupId>com.alibaba.otter</groupId>
<artifactId>canal.client</artifactId>
<exclusions>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
</exclusion>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
</exclusion>

<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</exclusion>

<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
</exclusion>

<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
</exclusion>

<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
</exclusion>
</exclusions>
<version>${test.framework.version}</version>
</dependency>
<!-- Spring Boot-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<version>${spring-boot-version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<version>${spring-boot-version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>${spring-boot-version}</version>
</dependency>
</dependencies>

<build>
<finalName>canal-scenario</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${compiler.version}</source>
<target>${compiler.version}</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>assemble</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>src/main/assembly/assembly.xml</descriptor>
</descriptors>
<outputDirectory>./target/</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

<pluginRepositories>
<pluginRepository>
<id>spring-snapshots</id>
<url>http://repo.spring.io/snapshot</url>
</pluginRepository>
<pluginRepository>
<id>spring-milestones</id>
<url>http://repo.spring.io/milestone</url>
</pluginRepository>
</pluginRepositories>
</project>
Loading

0 comments on commit 2c56cad

Please sign in to comment.