Skip to content

Commit

Permalink
Skip orchagent exit in mock test
Browse files Browse the repository at this point in the history
  • Loading branch information
Shi Su committed Jun 22, 2021
1 parent 0156675 commit 539b8fa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 5 additions & 2 deletions orchagent/orch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -786,8 +786,11 @@ task_process_status Orch::handleSaiGetStatus(sai_api_t api, sai_status_t status,
case SAI_STATUS_NOT_IMPLEMENTED:
SWSS_LOG_ERROR("Encountered failure in get operation due to the function is not implemented, exiting orchagent, SAI API: %s",
sai_serialize_api(api).c_str());
// exit(EXIT_FAILURE);
break; // TODO: enable EXIT_FAILURE
#ifdef MOCK_TEST
exit(EXIT_FAILURE);
#else
break;
#endif
default:
SWSS_LOG_ERROR("Encountered failure in get operation, SAI API: %s, status: %s",
sai_serialize_api(api).c_str(), sai_serialize_status(status).c_str());
Expand Down
2 changes: 2 additions & 0 deletions tests/mock_tests/portal.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

#define private public
#define protected public
#define MOCK_TEST

#include "aclorch.h"
#include "crmorch.h"

#undef protected
#undef private
#undef MOCK_TEST

struct Portal
{
Expand Down

0 comments on commit 539b8fa

Please sign in to comment.