Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
divyagayathri-hcl committed Dec 18, 2024
1 parent 8ba8ec3 commit ef51994
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions common/zmqproducerstatetable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ bool ZmqProducerStateTable::wait(std::string& dbName,
std::vector<std::shared_ptr<KeyOpFieldsValuesTuple>>& kcos)
{
SWSS_LOG_DEBUG("DIV:: Inside function ZmqProducerStateTable::wait");

return m_zmqClient.wait(dbName, tableName, kcos);
}

Expand Down
1 change: 1 addition & 0 deletions common/zmqproducerstatetable.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class ZmqProducerStateTable : public ProducerStateTable
public:
ZmqProducerStateTable(DBConnector *db, const std::string &tableName, ZmqClient &zmqClient, bool dbPersistence = true);
ZmqProducerStateTable(RedisPipeline *pipeline, const std::string &tableName, ZmqClient &zmqClient, bool buffered = false, bool dbPersistence = true);
// ~ZmqProducerStateTable() = default;

/* Implements set() and del() commands using notification messages */
virtual void set(const std::string &key,
Expand Down
4 changes: 4 additions & 0 deletions pyext/swsscommon.i
Original file line number Diff line number Diff line change
Expand Up @@ -330,10 +330,14 @@ T castSelectableObj(swss::Selectable *temp)
%apply std::string& OUTPUT {std::string &key};
%apply std::string& OUTPUT {std::string &op};
%apply std::vector<std::pair<std::string, std::string>>& OUTPUT {std::vector<std::pair<std::string, std::string>> &fvs};
%apply std::string& OUTPUT {std::string &dbName};
%apply std::string& OUTPUT {std::string &tableName};
%include "consumertablebase.h"
%clear std::string &key;
%clear std::string &op;
%clear std::vector<std::pair<std::string, std::string>> &fvs;
%clear std::string &dbName;
%clear std::string &tableName;

%include "consumertable.h"
%include "consumerstatetable.h"
Expand Down
6 changes: 3 additions & 3 deletions tests/zmq_state_ut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -555,9 +555,9 @@ static void ZmqWithResponse(bool producerPersistence)
cout << "DIV:: Function ZmqWithResponse ut 1 537" << endl;
std::vector<KeyOpFieldsValuesTuple> kcos;
kcos.push_back(KeyOpFieldsValuesTuple{"k", SET_COMMAND, std::vector<FieldValueTuple>{FieldValueTuple{"f", "v"}}});
std::vector<std::shared_ptr<KeyOpFieldsValuesTuple>> kcos_p;
//std::vector<std::shared_ptr<KeyOpFieldsValuesTuple>> kcos_p;
cout << "DIV:: Function ZmqWithResponse ut 1 541" << endl;
std::string dbName, tableName;
//std::string dbName, tableName;
for (int i = 0; i < 5; ++i)
{
cout << "DIV:: Function ZmqWithResponse ut 1 545" << endl;
Expand All @@ -574,7 +574,7 @@ static void ZmqWithResponse(bool producerPersistence)
TEST(ZmqWithResponse, test)
{
// test with persist by consumer
ZmqWithResponse(true);
ZmqWithResponse(false);
}

TEST(ZmqWithResponseClientError, test)
Expand Down

0 comments on commit ef51994

Please sign in to comment.