Skip to content

Add test case to verify zmq reconnect behaviour#84

Merged
r12f merged 2 commits intosonic-net:masterfrom
yue-fred-gao:zmq_reconnect
Jul 18, 2025
Merged

Add test case to verify zmq reconnect behaviour#84
r12f merged 2 commits intosonic-net:masterfrom
yue-fred-gao:zmq_reconnect

Conversation

@yue-fred-gao
Copy link
Copy Markdown
Collaborator

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

@mssonicbld
Copy link
Copy Markdown

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@r12f r12f merged commit cf03fe8 into sonic-net:master Jul 18, 2025
2 checks passed
qiluo-msft added a commit to sonic-net/sonic-swss-common that referenced this pull request Jul 19, 2025
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
@mssonicbld
Copy link
Copy Markdown

Cherry-pick PR to msft-202506: Azure/sonic-dash-ha.msft#6

mssonicbld added a commit to mssonicbld/sonic-swss-common.msft that referenced this pull request Jul 31, 2025
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
prabhataravind pushed a commit to Azure/sonic-swss-common.msft that referenced this pull request Jul 31, 2025
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
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 added a commit to mssonicbld/sonic-swss-common.msft that referenced this pull request Sep 10, 2025
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
mssonicbld added a commit to Azure/sonic-swss-common.msft that referenced this pull request Sep 10, 2025
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
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.

4 participants