Skip to content
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

Fixed issue with lack of clear message for erroneous suite definition #432

Merged
merged 7 commits into from
Jan 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ All notable changes to AET will be documented in this file.
**List of changes that are finished but not yet released in any final version.**
- [PR-439](https://github.com/Cognifide/aet/pull/439) Fixed duplicating line and column numbers in accessibility tab
- [PR-360](https://github.com/Cognifide/aet/pull/360) Keyboard shortcuts for 'Accept/Revert url/test' buttons ([#317](https://github.com/Cognifide/aet/issues/317))
- [PR-432](https://github.com/Cognifide/aet/pull/432) Fixed issue with lack of clear message for erroneous suite definition.

## Version 3.2.0

Expand Down
7 changes: 4 additions & 3 deletions client/client-scripts/aet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,9 @@ function process_locked_suite {
((UNLOCK_TIMEOUT-=5))
start_suite
else
echo "Unsuccessful Request to \"$endpoint$SUITE_ENDPOINT\", status: $code
$body"
errorMessage=$(echo $body | jq -r ".errorMessage")
echo "Unsuccessful Request to \"$endpoint$SUITE_ENDPOINT\", status: $code, error:
$errorMessage"
exit 1
fi
}
Expand Down Expand Up @@ -196,4 +197,4 @@ while $process_status; do
$body"
exit 1
fi
done
done
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,10 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response)

String responseBody = gson.toJson(suiteExecutionResult);

if (resultWrapper.hasError()) {
response.sendError(resultWrapper.getStatusCode(),
suiteExecutionResult.getErrorMessage());
} else {
response.setStatus(HttpStatus.SC_OK);
response.setContentType("application/json");
response.setCharacterEncoding(CharEncoding.UTF_8);
response.getWriter().write(responseBody);
}
response.setStatus(resultWrapper.getStatusCode());
response.setContentType("application/json");
response.setCharacterEncoding(CharEncoding.UTF_8);
response.getWriter().write(responseBody);
} else {
response.sendError(HttpStatus.SC_BAD_REQUEST, "Request does not contain the test suite");
}
Expand Down