Skip to content

Commit ed0a484

Browse files
jimmyzhaidprital
authored andcommitted
[p4rt-tests] Bind response consumer to appl_state_db (sonic-net#2105)
What I did In p4rt test scripts, bind response consumer to appl_state_db for consistency. Why I did it In p4orch, the relating notification producer for table P4RT_TABLE is on database appl state db How I verified it Run vstest Details if related notification channel name would be tagged dbId - sonic-net/sonic-swss-common#568
1 parent bcb46dd commit ed0a484

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

tests/p4rt/test_l3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def _set_up(self, dvs):
2323
self._p4rt_route_obj.set_up_databases(dvs)
2424
self._p4rt_wcmp_group_obj.set_up_databases(dvs)
2525
self.response_consumer = swsscommon.NotificationConsumer(
26-
self._p4rt_route_obj.appl_db, "APPL_DB_P4RT_TABLE_RESPONSE_CHANNEL")
26+
self._p4rt_route_obj.appl_state_db, "APPL_DB_P4RT_TABLE_RESPONSE_CHANNEL")
2727

2828
def _set_vrf(self, dvs):
2929
# Create VRF.

tests/p4rt/test_p4rt_acl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def _set_up(self, dvs):
6363
self._p4rt_udf_obj.set_up_databases(dvs)
6464

6565
self.response_consumer = swsscommon.NotificationConsumer(
66-
self._p4rt_acl_table_definition_obj.appl_db, "APPL_DB_P4RT_TABLE_RESPONSE_CHANNEL"
66+
self._p4rt_acl_table_definition_obj.appl_state_db, "APPL_DB_P4RT_TABLE_RESPONSE_CHANNEL"
6767
)
6868

6969
@pytest.mark.skip(reason="p4orch is not enabled")

tests/p4rt/test_p4rt_mirror.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def _set_up(self, dvs):
4242
self._p4rt_mirror_session_wrapper = P4RtMirrorSessionWrapper()
4343
self._p4rt_mirror_session_wrapper.set_up_databases(dvs)
4444
self._response_consumer = swsscommon.NotificationConsumer(
45-
self._p4rt_mirror_session_wrapper.appl_db, "APPL_DB_P4RT_TABLE_RESPONSE_CHANNEL")
45+
self._p4rt_mirror_session_wrapper.appl_state_db, "APPL_DB_P4RT_TABLE_RESPONSE_CHANNEL")
4646

4747
def test_MirrorSessionAddModifyAndDelete(self, dvs, testlog):
4848
# Initialize database connectors

0 commit comments

Comments
 (0)