Skip to content

Commit

Permalink
xds-envoy-test - 11
Browse files Browse the repository at this point in the history
Signed-off-by: daizhenyu <[email protected]>
  • Loading branch information
daizhenyu committed Jul 25, 2024
1 parent 34d16ce commit 318417e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}

Expand All @@ -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 "";
}
}
}

0 comments on commit 318417e

Please sign in to comment.