File tree Expand file tree Collapse file tree 3 files changed +16
-0
lines changed
validator/src/main/java/com/amazon/aoc Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 3232@ Log4j2
3333public class HttpCaller implements ICaller {
3434 private String url ;
35+ private String path ;
3536
37+ /**
38+ * construct httpCaller.
39+ * @param endpoint the endpoint to call, for example "http://127.0.0.1:8080"
40+ * @param path the path to call, for example "/test"
41+ */
3642 public HttpCaller (String endpoint , String path ) {
43+ this .path = path ;
3744 this .url = endpoint + path ;
3845 log .info ("validator is trying to hit this {} endpoint" , this .url );
3946 }
@@ -73,4 +80,9 @@ public SampleAppResponse callSampleApp() throws Exception {
7380
7481 return sampleAppResponseAtomicReference .get ();
7582 }
83+
84+ @ Override
85+ public String getCallingPath () {
86+ return path ;
87+ }
7688}
Original file line number Diff line number Diff line change 1919
2020public interface ICaller {
2121 SampleAppResponse callSampleApp () throws Exception ;
22+
23+ String getCallingPath ();
2224}
Original file line number Diff line number Diff line change @@ -77,6 +77,8 @@ public void validate() throws Exception {
7777 throw new BaseException (ExceptionCode .DATA_MODEL_NOT_MATCHED );
7878 }
7979 }
80+
81+ log .info ("validation is passed for path {}" , caller .getCallingPath ());
8082 }
8183
8284 // this method will hit get trace from x-ray service and get retrieved trace
You can’t perform that action at this time.
0 commit comments