diff --git a/common/schema.h b/common/schema.h index 461ea4d82..2713a6bc1 100644 --- a/common/schema.h +++ b/common/schema.h @@ -212,6 +212,7 @@ namespace swss { #define COUNTERS_RIF_TYPE_MAP "COUNTERS_RIF_TYPE_MAP" #define COUNTERS_RIF_NAME_MAP "COUNTERS_RIF_NAME_MAP" #define COUNTERS_TRAP_NAME_MAP "COUNTERS_TRAP_NAME_MAP" +#define COUNTERS_POLICER_NAME_MAP "COUNTERS_POLICER_NAME_MAP" #define COUNTERS_CRM_TABLE "CRM" #define COUNTERS_BUFFER_POOL_NAME_MAP "COUNTERS_BUFFER_POOL_NAME_MAP" #define COUNTERS_SWITCH_NAME_MAP "COUNTERS_SWITCH_NAME_MAP" @@ -279,10 +280,13 @@ namespace swss { #define TUNNEL_ATTR_ID_LIST "TUNNEL_ATTR_ID_LIST" #define ACL_COUNTER_ATTR_ID_LIST "ACL_COUNTER_ATTR_ID_LIST" #define FLOW_COUNTER_ID_LIST "FLOW_COUNTER_ID_LIST" +#define POLICER_COUNTER_ID_LIST "POLICER_COUNTER_ID_LIST" #define PLUGIN_TABLE "PLUGIN_TABLE" #define LUA_PLUGIN_TYPE "LUA_PLUGIN_TYPE" #define SAI_OBJECT_TYPE "SAI_OBJECT_TYPE" +#define BULK_CHUNK_SIZE_FIELD "BULK_CHUNK_SIZE" +#define BULK_CHUNK_SIZE_PER_PREFIX_FIELD "BULK_CHUNK_SIZE_PER_PREFIX" #define POLL_INTERVAL_FIELD "POLL_INTERVAL" #define STATS_MODE_FIELD "STATS_MODE" #define STATS_MODE_READ "STATS_MODE_READ" diff --git a/common/zmqclient.cpp b/common/zmqclient.cpp index de9f9a4f1..727e7cec6 100644 --- a/common/zmqclient.cpp +++ b/common/zmqclient.cpp @@ -203,6 +203,7 @@ void ZmqClient::sendMsg( } //TODO: To implement the wait() method later. +// To implement ZMQ_CLIENT and ZMQ_SERVER socket types for response path. bool ZmqClient::wait(const std::string& dbName, const std::string& tableName, const std::vector>& kcos) diff --git a/tests/c_api_ut.cpp b/tests/c_api_ut.cpp index 864fb8fc2..f59d25825 100644 --- a/tests/c_api_ut.cpp +++ b/tests/c_api_ut.cpp @@ -262,16 +262,12 @@ TEST(c_api, ZmqConsumerProducerStateTable) { if (flag == 0) for (uint64_t i = 0; i < arr.len; i++) - { SWSSZmqProducerStateTable_set(pst, arr.data[i].key, arr.data[i].fieldValues); - } else - { SWSSZmqClient_sendMsg(cli, "TEST_DB", "mytable", arr); - } + sleep(2); ASSERT_EQ(SWSSZmqConsumerStateTable_readData(cst, 1500, true), SWSSSelectResult_DATA); - sleep(2); arr = SWSSZmqConsumerStateTable_pops(cst); vector kfvs = takeKeyOpFieldValuesArray(arr); @@ -295,7 +291,6 @@ TEST(c_api, ZmqConsumerProducerStateTable) { EXPECT_EQ(fieldValues1[0].first, "myfield3"); EXPECT_EQ(fieldValues1[0].second, "myvalue3"); - sleep(2); arr = SWSSZmqConsumerStateTable_pops(cst); ASSERT_EQ(arr.len, 0); freeKeyOpFieldValuesArray(arr); @@ -309,6 +304,7 @@ TEST(c_api, ZmqConsumerProducerStateTable) { SWSSZmqProducerStateTable_del(pst, arr.data[i].key); else SWSSZmqClient_sendMsg(cli, "TEST_DB", "mytable", arr); + sleep(2); ASSERT_EQ(SWSSZmqConsumerStateTable_readData(cst, 500, true), SWSSSelectResult_DATA); arr = SWSSZmqConsumerStateTable_pops(cst);