Skip to content

Add test case to verify zmq reconnect behaviour#1052

Merged
qiluo-msft merged 1 commit intosonic-net:masterfrom
qiluo-msft:qiluo/sync
Jul 19, 2025
Merged

Add test case to verify zmq reconnect behaviour#1052
qiluo-msft merged 1 commit intosonic-net:masterfrom
qiluo-msft:qiluo/sync

Conversation

@qiluo-msft
Copy link
Contributor

This PR is a partial duplicate of sonic-net/sonic-dash-ha#84
Since crates/swss-common will be moved in this repo.

why

During investigating issue #75, I created test case to verify zmq behaviour in handling no connection and connection loss. It is found that with the current swss-common zmq implementation with below attributes, we don't need to handle reconnect explicitly.

  • PUSH/PULL model
  • ZMQ_IMMEDIATE = 0 (default)
  • ZMQ_SNDHWM = 10000

what this PR does

  • add unit test for zmq late connect and reconnect for regression
  • remove unneeded code for falling back to ProducerStateTable in test environment since zmq client won't fail if zmq server is not connected.
  • update test_utils/README.md with missing argument to start redis in test environment

### why
During investigating issue sonic-net#75, I created test case to verify zmq
behaviour in handling no connection and connection loss. It is found
that with the current swss-common zmq implementation with below
attributes, we don't need to handle reconnect explicitly.

- PUSH/PULL model
- ZMQ_IMMEDIATE = 0 (default)
- ZMQ_SNDHWM = 10000

### what this PR does

- add unit test for zmq late connect and reconnect for regression
- remove unneeded code for falling back to ProducerStateTable in test
environment since zmq client won't fail if zmq server is not connected.
- update test_utils/README.md with missing argument to start redis in
test environment
@mssonicbld
Copy link
Collaborator

/azp run

@qiluo-msft qiluo-msft requested a review from yue-fred-gao July 18, 2025 22:14
@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

Cherry-pick PR to msft-202506: Azure/sonic-swss-common.msft#50

mssonicbld added a commit to mssonicbld/sonic-dash-ha.msft that referenced this pull request Jul 31, 2025
prabhataravind pushed a commit to Azure/sonic-dash-ha.msft that referenced this pull request Jul 31, 2025
wen587 pushed a commit to wen587/sonic-swss-common that referenced this pull request Aug 5, 2025
…-net#1052)

This PR is a partial duplicate of sonic-net/sonic-dash-ha#84
Since crates/swss-common will be moved in this repo.

why
During investigating issue sonic-net#75, I created test case to verify zmq behaviour in handling no connection and connection loss. It is found that with the current swss-common zmq implementation with below attributes, we don't need to handle reconnect explicitly.

PUSH/PULL model
ZMQ_IMMEDIATE = 0 (default)
ZMQ_SNDHWM = 10000
what this PR does
add unit test for zmq late connect and reconnect for regression
remove unneeded code for falling back to ProducerStateTable in test environment since zmq client won't fail if zmq server is not connected.
update test_utils/README.md with missing argument to start redis in test environment
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to msft-202412: Azure/sonic-swss-common.msft#63

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants