-
-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] [plugin-rest-api] Move response time value reporting from sub-steps to attachment #3829
base: master
Are you sure you want to change the base?
[WIP] [plugin-rest-api] Move response time value reporting from sub-steps to attachment #3829
Conversation
EDbarvinsky
commented
Apr 13, 2023
•
edited
Loading
edited
- update unit tests
{ | ||
Header[] headers = response.getResponseHeaders(); | ||
String attachmentTitle = String.format("Response: %s %s", response.getMethod(), response.getFrom()); | ||
String mimeType = getMimeType(headers).orElseGet(ContentType.DEFAULT_TEXT::getMimeType); | ||
attachApiMessage(attachmentTitle, headers, response.getResponseBody(), mimeType, response.getStatusCode()); | ||
attachApiMessage(attachmentTitle, headers, response.getResponseBody(), mimeType, response.getStatusCode(), | ||
response.getResponseTimeInMs()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6 args to much ?
can be replaced with response
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you won't be able to use response
in attachApiMessage
since it's used to requests as well
Codecov Report
@@ Coverage Diff @@
## master #3829 +/- ##
============================================
- Coverage 97.07% 97.05% -0.03%
+ Complexity 6111 6108 -3
============================================
Files 850 850
Lines 17484 17462 -22
Branches 1141 1139 -2
============================================
- Hits 16973 16948 -25
- Misses 406 408 +2
- Partials 105 106 +1
... and 5 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@@ -80,25 +80,28 @@ public void process(HttpRequest request, EntityDetails entityDetails, HttpContex | |||
} | |||
} | |||
} | |||
attachApiMessage("Request: " + request, request.getHeaders(), body, mimeType, -1); | |||
attachApiMessage("Request: " + request, request.getHeaders(), body, mimeType, -1, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
attachApiMessage("Request: " + request, request.getHeaders(), body, mimeType, -1, 0); | |
attachApiMessage("Request: " + request, request.getHeaders(), body, mimeType, -1, -1); |
{ | ||
Header[] headers = response.getResponseHeaders(); | ||
String attachmentTitle = String.format("Response: %s %s", response.getMethod(), response.getFrom()); | ||
String mimeType = getMimeType(headers).orElseGet(ContentType.DEFAULT_TEXT::getMimeType); | ||
attachApiMessage(attachmentTitle, headers, response.getResponseBody(), mimeType, response.getStatusCode()); | ||
attachApiMessage(attachmentTitle, headers, response.getResponseBody(), mimeType, response.getStatusCode(), | ||
response.getResponseTimeInMs()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you won't be able to use response
in attachApiMessage
since it's used to requests as well
<?xml version="1.0" encoding="UTF-8"?> | ||
<Configuration> | ||
<Loggers> | ||
<Logger name="org.vividus.http.HttpRequestExecutor" level="INFO" additivity="false"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😮
vividus-plugin-rest-api/src/main/resources/org/vividus/http/attachment/api-message.ftl
Show resolved
Hide resolved
9a78df0
to
1478cf8
Compare