Skip to content

Commit

Permalink
Slight change to test
Browse files Browse the repository at this point in the history
  • Loading branch information
DDH13 committed Apr 30, 2024
1 parent 064a678 commit fe87a63
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions test/cucumber-tests/scripts/setup-hosts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ kubectl wait deployment/backend-retry-deployment -n apk-integration-test --for=c
kubectl wait deployment/dynamic-backend -n apk-integration-test --for=condition=available --timeout=600s
kubectl wait deployment/interceptor-service-deployment -n apk-integration-test --for=condition=available --timeout=600s
kubectl wait deployment/graphql-faker -n apk-integration-test --for=condition=available --timeout=600s
kubectl wait deployment/grpc-backend -n apk-integration-test --for=condition=available --timeout=600s
kubectl wait --timeout=5m -n apk-integration-test deployment/apk-test-setup-wso2-apk-adapter-deployment --for=condition=Available
kubectl wait --timeout=15m -n apk-integration-test deployment/apk-test-setup-wso2-apk-gateway-runtime-deployment --for=condition=Available
IP=$(kubectl get svc apk-test-setup-wso2-apk-gateway-service -n apk-integration-test --output jsonpath='{.status.loadBalancer.ingress[0].ip}')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public void GetStudent(String arg0, int arg1) throws StatusRuntimeException {
public void GetStudentDefaultVersion(String arg0, int arg1) throws StatusRuntimeException {
try {
SimpleGRPCStudentClient grpcStudentClient = new SimpleGRPCStudentClient(arg0, arg1);
sharedContext.setStudentResponse(grpcStudentClient.GetStudent(sharedContext.getHeaders()));
sharedContext.setStudentResponse(grpcStudentClient.GetStudentDefaultVersion(sharedContext.getHeaders()));
} catch (StatusRuntimeException e) {
if (e.getStatus().getCode()== Status.Code.PERMISSION_DENIED){
sharedContext.setGrpcErrorCode(403);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,12 @@ public StudentResponse GetStudent(Map<String, String> headers) throws StatusRunt
.build();
StudentServiceGrpc.StudentServiceBlockingStub blockingStub = StudentServiceGrpc.newBlockingStub(managedChannel);
if (blockingStub == null) {
log.error("Failed to create blocking stub");
throw new RuntimeException("Failed to create blocking stub");
}
StudentResponse response = blockingStub.getStudent(StudentRequest.newBuilder().setId(1).build());
if (response == null) {
log.error("Failed to get student");
throw new RuntimeException("Failed to get student");
}
return response;
Expand Down Expand Up @@ -82,10 +84,12 @@ public StudentResponse GetStudentDefaultVersion(Map<String, String> headers) thr
.build();
StudentServiceDefaultVersionGrpc.StudentServiceBlockingStub blockingStub = StudentServiceDefaultVersionGrpc.newBlockingStub(managedChannel);
if (blockingStub == null) {
log.error("Failed to create blocking stub");
throw new RuntimeException("Failed to create blocking stub");
}
StudentResponse response = blockingStub.getStudent(StudentRequest.newBuilder().setId(1).build());
if (response == null) {
log.error("Failed to get student");
throw new RuntimeException("Failed to get student");
}
return response;
Expand Down

0 comments on commit fe87a63

Please sign in to comment.