diff --git a/.github/workflows/e2e.php.yaml b/.github/workflows/e2e.php.yaml index 9dac23119423fdcd5129bdd61d78e44db5f6f6c2..19b5fc72f1c186027c1c589fcb8b5ca5bbd59450 100644 --- a/.github/workflows/e2e.php.yaml +++ b/.github/workflows/e2e.php.yaml @@ -41,9 +41,8 @@ jobs: run: make docker - name: Copy dist package run: cp -R dist test/e2e/ -# TODO, PHP hasn't followed the v3 protocol -# - name: PHP -# run: ./mvnw --batch-mode -f test/e2e/pom.xml -am -DfailIfNoTests=false verify -Dit.test=org.apache.skywalking.e2e.PHPE2E + - name: PHP + run: ./mvnw --batch-mode -f test/e2e/pom.xml -am -DfailIfNoTests=false verify -Dit.test=org.apache.skywalking.e2e.PHPE2E - uses: actions/upload-artifact@v1 if: failure() with: diff --git a/test/e2e/e2e-test/docker/php/docker-compose.yml b/test/e2e/e2e-test/docker/php/docker-compose.yml index dcadec81943361ea25d38e8f015c431dfbeb0044..767a4f267caf7e272acc688d820116711b43337c 100644 --- a/test/e2e/e2e-test/docker/php/docker-compose.yml +++ b/test/e2e/e2e-test/docker/php/docker-compose.yml @@ -22,7 +22,7 @@ services: service: oap php-shadow: - image: skyapm/skywalking-php:v3.2.8 + image: skyapm/skywalking-php:v3.3.2 networks: - e2e expose: @@ -37,7 +37,7 @@ services: - ./php-shadow.ini:/usr/local/etc/php/conf.d/ext-skywalking.ini php: - image: skyapm/skywalking-php:v3.2.8 + image: skyapm/skywalking-php:v3.3.2 networks: - e2e expose: @@ -55,7 +55,7 @@ services: ui: extends: - file: ../../base-compose.yml + file: ../base-compose.yml service: ui depends_on: php: diff --git a/test/e2e/e2e-test/docker/php/index.php b/test/e2e/e2e-test/docker/php/index.php index 604fbae62462750220bbc51ef393394894853c14..149768bd4db3c219f8c4170dc3829d96c6f7eeb8 100644 --- a/test/e2e/e2e-test/docker/php/index.php +++ b/test/e2e/e2e-test/docker/php/index.php @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -usleep(200000); +usleep(500000); $uri = $_SERVER['REQUEST_URI']; if($uri == '/php/info') { diff --git a/test/e2e/e2e-test/docker/php/php-shadow.ini b/test/e2e/e2e-test/docker/php/php-shadow.ini index dbffe5ea37b98b000e45d42ce0d9988a1ef78e77..13bcf512e7684f2a696ab69fd47c2f07e9ac294c 100644 --- a/test/e2e/e2e-test/docker/php/php-shadow.ini +++ b/test/e2e/e2e-test/docker/php/php-shadow.ini @@ -17,5 +17,5 @@ extension=skywalking.so skywalking.app_code = php-shadow skywalking.enable = 1 -skywalking.version = 6 +skywalking.version = 8 skywalking.sock_path = /tmp/sky-agent.sock \ No newline at end of file diff --git a/test/e2e/e2e-test/docker/php/php.ini b/test/e2e/e2e-test/docker/php/php.ini index 52434c8ab4e1ebaf8baedadd4619525eb7f0faf9..6a24e82ab58d39a386e2c8c8db049a877c8cd04d 100644 --- a/test/e2e/e2e-test/docker/php/php.ini +++ b/test/e2e/e2e-test/docker/php/php.ini @@ -17,5 +17,5 @@ extension=skywalking.so skywalking.app_code = php skywalking.enable = 1 -skywalking.version = 6 +skywalking.version = 8 skywalking.sock_path = /tmp/sky-agent.sock \ No newline at end of file diff --git a/test/e2e/e2e-test/src/test/java/org/apache/skywalking/e2e/PHPE2E.java b/test/e2e/e2e-test/src/test/java/org/apache/skywalking/e2e/PHPE2E.java index 928504a3b9667b087b20c760a5d14b021641ac03..2a5dcb8a261aa6ec5dc7bfc4930a4c54b79ed31c 100644 --- a/test/e2e/e2e-test/src/test/java/org/apache/skywalking/e2e/PHPE2E.java +++ b/test/e2e/e2e-test/src/test/java/org/apache/skywalking/e2e/PHPE2E.java @@ -19,7 +19,6 @@ package org.apache.skywalking.e2e; import java.util.List; -import java.net.URL; import lombok.extern.slf4j.Slf4j; import org.apache.skywalking.e2e.annotation.ContainerHostAndPort; import org.apache.skywalking.e2e.annotation.DockerCompose; @@ -90,12 +89,6 @@ public class PHPE2E extends SkyWalkingTestAdapter { @BeforeAll public void setUp() throws Exception { - URL url = new URL("http", phpHostPort.host(), phpHostPort.port(), "/init"); - restTemplate.getForObject(url.toURI(), String.class); - Thread.sleep(1000); - url = new URL("http", phpShadowHostPort.host(), phpShadowHostPort.port(), "/init-shadow"); - restTemplate.getForObject(url.toURI(), String.class); - Thread.sleep(1000); queryClient(swWebappHostPort); trafficController(phpHostPort, "/php/info"); @@ -156,8 +149,8 @@ public class PHPE2E extends SkyWalkingTestAdapter { new ServiceInstanceTopologyQuery().stepByMinute() .start(startTime.minusDays(1)) .end(now()) - .clientServiceId("1") - .serverServiceId("2")); + .clientServiceId("cGhw.1") + .serverServiceId("cGhwLXNoYWRvdw==.1")); LOGGER.info("topology: {}", topology); diff --git a/test/e2e/e2e-test/src/test/resources/expected/php/instances.yml b/test/e2e/e2e-test/src/test/resources/expected/php/instances.yml index 7d1f3303268cf64c9ddad853a50fdd175705bf62..8b48384c636e1bcf08a830b6de3178dde9d85a47 100644 --- a/test/e2e/e2e-test/src/test/resources/expected/php/instances.yml +++ b/test/e2e/e2e-test/src/test/resources/expected/php/instances.yml @@ -14,14 +14,14 @@ # limitations under the License. instances: - - key: 2 + - key: not null label: not null attributes: - - name: OS Name + - name: os_name value: not null - - name: hostname + - name: host_name value: not null - - name: Process No. + - name: process_no value: gt 0 - name: ipv4s value: not null diff --git a/test/e2e/e2e-test/src/test/resources/expected/php/serviceInstanceTopo.yml b/test/e2e/e2e-test/src/test/resources/expected/php/serviceInstanceTopo.yml index 238e70a9ab14462c9a647d335065d093b5b528f6..5cd197cfe7be86fdb9bf7fbce1066439e2ccf258 100644 --- a/test/e2e/e2e-test/src/test/resources/expected/php/serviceInstanceTopo.yml +++ b/test/e2e/e2e-test/src/test/resources/expected/php/serviceInstanceTopo.yml @@ -14,21 +14,22 @@ # limitations under the License. nodes: - - id: 1 - name: User - type: USER - serviceId: 1 - serviceName: User - isReal: false - - id: 2 + - id: not null name: not null - serviceId: 2 + serviceId: cGhwLXNoYWRvdw==.1 + serviceName: php-shadow + #type: USER + isReal: true + - id: not null + name: not null + serviceId: cGhw.1 serviceName: php - type: not null + #type: USER isReal: true calls: - - id: 1_2 - source: 1 + - id: not null + source: not null detectPoints: + - CLIENT - SERVER - target: 2 + target: not null diff --git a/test/e2e/e2e-test/src/test/resources/expected/php/services.yml b/test/e2e/e2e-test/src/test/resources/expected/php/services.yml index d57c2a5e408a170ff24e81b9359e1494c811d120..de624f40fee099dd3c8ca8d9a4b0ac9056ced898 100644 --- a/test/e2e/e2e-test/src/test/resources/expected/php/services.yml +++ b/test/e2e/e2e-test/src/test/resources/expected/php/services.yml @@ -14,7 +14,7 @@ # limitations under the License. services: - - key: gt 0 - label: "php" - - key: gt 0 - label: "php-shadow" \ No newline at end of file + - key: cGhwLXNoYWRvdw==.1 + label: "php-shadow" + - key: cGhw.1 + label: "php" \ No newline at end of file diff --git a/test/e2e/e2e-test/src/test/resources/expected/php/shadowInstances.yml b/test/e2e/e2e-test/src/test/resources/expected/php/shadowInstances.yml index 3d4f46078d74890170cad325aaf47ffe350c56be..8b48384c636e1bcf08a830b6de3178dde9d85a47 100644 --- a/test/e2e/e2e-test/src/test/resources/expected/php/shadowInstances.yml +++ b/test/e2e/e2e-test/src/test/resources/expected/php/shadowInstances.yml @@ -14,14 +14,14 @@ # limitations under the License. instances: - - key: 3 + - key: not null label: not null attributes: - - name: OS Name + - name: os_name value: not null - - name: hostname + - name: host_name value: not null - - name: Process No. + - name: process_no value: gt 0 - name: ipv4s value: not null diff --git a/test/e2e/e2e-test/src/test/resources/expected/php/topo.yml b/test/e2e/e2e-test/src/test/resources/expected/php/topo.yml index 09462de1b809a23c2921a5e5feb77a1c75ac40df..717e5730c529cb1174527d72c1b4975cf264fa15 100644 --- a/test/e2e/e2e-test/src/test/resources/expected/php/topo.yml +++ b/test/e2e/e2e-test/src/test/resources/expected/php/topo.yml @@ -13,28 +13,32 @@ # See the License for the specific language governing permissions and # limitations under the License. +# VXNlcg== user +# cGhwLXNoYWRvdw== php-shadow +# cGhw php + nodes: - - id: 1 + - id: VXNlcg==.0 name: User type: USER isReal: false - - id: 2 - name: php - type: HttpClient - isReal: true - - id: 3 + - id: cGhwLXNoYWRvdw==.1 name: php-shadow - type: HttpClient + type: http + isReal: true + - id: cGhw.1 + name: php + type: http isReal: true calls: - - id: 1_2 - source: 1 + - id: VXNlcg==.0-cGhw.1 + source: VXNlcg==.0 detectPoints: - SERVER - target: 2 - - id: 2_3 - source: 2 + target: cGhw.1 + - id: cGhw.1-cGhwLXNoYWRvdw==.1 + source: cGhw.1 detectPoints: - CLIENT - SERVER - target: 3 \ No newline at end of file + target: cGhwLXNoYWRvdw==.1 \ No newline at end of file