Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mock tests] Update MockDBConnector to match new swsscommon interface #1465

Merged
merged 1 commit into from
Oct 13, 2020

Conversation

daall
Copy link
Contributor

@daall daall commented Oct 12, 2020

Signed-off-by: Danny Allen [email protected]

What I did
I updated the MockDBConnector class to respect the access-level of the m_conn member variable.

Why I did it
sonic-net/sonic-swss-common#387 refactored the DBConnector class and changed the access level of a few member fields. So, to make the mock implementation correct, we need to use the proper setter method to update the redis connection.

How I verified it
Built locally w/ latest sairedis and swsscommon changes.

Details if related
This should fix the following jenkins issue:
https://sonic-jenkins.westus2.cloudapp.azure.com/job/vs/job/sonic-sairedis-build/1344/console

Which will in turn fix this issue:
https://sonic-jenkins.westus2.cloudapp.azure.com/job/vs/job/sonic-swss-build/1944/console

@lguohan
Copy link
Contributor

lguohan commented Oct 12, 2020

@qiluo-msft , the function does not seem like a mock. why do we need it?

@daall daall merged commit 793f9bd into sonic-net:master Oct 13, 2020
@daall daall deleted the fix_build_break branch October 13, 2020 00:04
@qiluo-msft
Copy link
Contributor

It is a mock. Without it, a Redis service is required to run gtest unit tests.

anish-n pushed a commit to anish-n/sonic-swss that referenced this pull request Feb 26, 2021
kktheballer pushed a commit to kktheballer/sonic-swss that referenced this pull request Jul 21, 2021
EdenGri pushed a commit to EdenGri/sonic-swss that referenced this pull request Feb 28, 2022
…-net#1465)

Use the fast-reboot-dump and filter_fdb_entries scripts to cache the current ARP and FDB tables in /host/config-reload. Also create a file in the same directory to indicate to SWSS that it should restore from the cache.

Signed-off-by: Lawrence Lee <[email protected]>
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.

3 participants