You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ke...@apache.org on 2020/06/05 10:05:05 UTC

[skywalking] branch master updated: [PHP-E2E] Support v8 (#4862)

This is an automated email from the ASF dual-hosted git repository.

kezhenxu94 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking.git


The following commit(s) were added to refs/heads/master by this push:
     new 305a6b3  [PHP-E2E] Support v8 (#4862)
305a6b3 is described below

commit 305a6b3032f120e8fd0aa4389cfef6f03f740531
Author: 何延龙 <ya...@gmail.com>
AuthorDate: Fri Jun 5 18:02:44 2020 +0800

    [PHP-E2E] Support v8 (#4862)
---
 .github/workflows/e2e.php.yaml                     |  5 ++--
 test/e2e/e2e-test/docker/php/docker-compose.yml    |  6 ++---
 test/e2e/e2e-test/docker/php/index.php             |  2 +-
 test/e2e/e2e-test/docker/php/php-shadow.ini        |  2 +-
 test/e2e/e2e-test/docker/php/php.ini               |  2 +-
 .../java/org/apache/skywalking/e2e/PHPE2E.java     | 11 ++------
 .../src/test/resources/expected/php/instances.yml  |  8 +++---
 .../resources/expected/php/serviceInstanceTopo.yml | 25 +++++++++---------
 .../src/test/resources/expected/php/services.yml   |  8 +++---
 .../resources/expected/php/shadowInstances.yml     |  8 +++---
 .../src/test/resources/expected/php/topo.yml       | 30 ++++++++++++----------
 11 files changed, 52 insertions(+), 55 deletions(-)

diff --git a/.github/workflows/e2e.php.yaml b/.github/workflows/e2e.php.yaml
index 9dac231..19b5fc7 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 dcadec8..767a4f2 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 604fbae..149768b 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 dbffe5e..13bcf51 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 52434c8..6a24e82 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 928504a..2a5dcb8 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 7d1f330..8b48384 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 238e70a..5cd197c 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 d57c2a5..de624f4 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 3d4f460..8b48384 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 09462de..717e573 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