Skip to content

Commit

Permalink
add tests for ok and err codes with and without err message, re #11392
Browse files Browse the repository at this point in the history
  • Loading branch information
FedeMPouzols committed Apr 3, 2015
1 parent d4ad309 commit 9f62164
Show file tree
Hide file tree
Showing 3 changed files with 383 additions and 39 deletions.
Expand Up @@ -70,14 +70,14 @@ class DLLExport MantidWebServiceAPIJobManager

protected:
/// Use the helper for these operations
std::istream &httpGet(const std::string &path,
virtual std::istream &httpGet(const std::string &path,
const std::string &query_str = "",
const std::string &username = "",
const std::string &password = "") const {
return m_helper.httpGet(path, query_str, username, password);
}

std::istream &
virtual std::istream &
httpPost(const std::string &path,
const MantidWebServiceAPIHelper::PostDataMap &postData,
const MantidWebServiceAPIHelper::PostDataMap &fileData =
Expand All @@ -87,7 +87,7 @@ class DLLExport MantidWebServiceAPIJobManager
return m_helper.httpPost(path, postData, fileData, username, password);
}

Poco::Net::HTTPResponse::HTTPStatus lastStatus() const {
virtual Poco::Net::HTTPResponse::HTTPStatus lastStatus() const {
return m_helper.lastStatus();
}

Expand Down
Expand Up @@ -30,7 +30,6 @@ using namespace Mantid::Kernel;
void MantidWebServiceAPIJobManager::abortRemoteJob(const std::string &jobID) {
std::istream &respStream =
httpGet("/abort", std::string("JobID=") + jobID);

if (lastStatus() != Poco::Net::HTTPResponse::HTTP_OK) {
JSONObject resp;
initFromStream(resp, respStream);
Expand Down

0 comments on commit 9f62164

Please sign in to comment.