From 318417e307d14a2b2e3ab557812f96059912b6a4 Mon Sep 17 00:00:00 2001 From: daizhenyu <1449308021@qq.com> Date: Thu, 25 Jul 2024 10:02:52 +0800 Subject: [PATCH] xds-envoy-test - 11 Signed-off-by: daizhenyu <1449308021@qq.com> --- .../xds-service-discovery/client-envoy/action.yml | 8 ++------ .../demo/spring/client/SpringClientController.java | 5 ++--- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/actions/scenarios/xds-service/xds-service-discovery/client-envoy/action.yml b/.github/actions/scenarios/xds-service/xds-service-discovery/client-envoy/action.yml index 575689132f..5187497832 100644 --- a/.github/actions/scenarios/xds-service/xds-service-discovery/client-envoy/action.yml +++ b/.github/actions/scenarios/xds-service/xds-service-discovery/client-envoy/action.yml @@ -24,14 +24,10 @@ runs: run: | kubectl apply -f sermant-integration-tests/xds-service-test/script/spring-server-sermant.yaml kubectl wait --for=condition=ready pod -l app=spring-server --timeout=10s + sleep 5s - name: test one server shell: bash run: | - kubectl get pod -o wide - kubectl get svc - POD_NAME=$(kubectl get pods -l app=spring-server -o jsonpath='{.items[0].metadata.name}') - kubectl logs $POD_NAME - sleep 10s mvn test -Dxds.service.integration.test.type=DISCOVERY_ONE_SERVER_INSTANCE_ENVOY --file \ sermant-integration-tests/xds-service-test/xds-service-integration-test/pom.xml - name: stop spring-server @@ -49,7 +45,7 @@ runs: run: | kubectl apply -f sermant-integration-tests/xds-service-test/script/spring-server-sermant.yaml kubectl wait --for=condition=ready pod -l app=spring-server --timeout=10s - sleep 2s + sleep 5s - name: test the number of spring-server instances changes from 0 to 1 shell: bash run: | diff --git a/sermant-integration-tests/xds-service-test/spring-client/src/main/java/io/sermant/demo/spring/client/SpringClientController.java b/sermant-integration-tests/xds-service-test/spring-client/src/main/java/io/sermant/demo/spring/client/SpringClientController.java index 65f595c6f5..b5f6579c78 100644 --- a/sermant-integration-tests/xds-service-test/spring-client/src/main/java/io/sermant/demo/spring/client/SpringClientController.java +++ b/sermant-integration-tests/xds-service-test/spring-client/src/main/java/io/sermant/demo/spring/client/SpringClientController.java @@ -82,7 +82,6 @@ public String hello(String address) { urlBuilder.append("http://"); urlBuilder.append(address); urlBuilder.append(HELLO_METHOD_PATH); - System.out.println(urlBuilder.toString()); return httpGet(urlBuilder.toString()); } @@ -92,9 +91,9 @@ private String httpGet(String url) { if (response.getStatusLine().getStatusCode() == SUCCESS_CODE) { return EntityUtils.toString(response.getEntity()); } - return "response: " + response.toString() + "---" + EntityUtils.toString(response.getEntity()) + "---" + response.getStatusLine().getStatusCode(); + return ""; } catch (IOException e) { - return "error: " + e; + return ""; } } }