Skip to content

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

Merged
daall merged 1 commit intosonic-net:masterfrom
daall:fix_build_break
Oct 13, 2020
Merged

[mock tests] Update MockDBConnector to match new swsscommon interface#1465
daall merged 1 commit intosonic-net:masterfrom
daall:fix_build_break

Conversation

@daall
Copy link
Copy Markdown
Contributor

@daall daall commented Oct 12, 2020

Signed-off-by: Danny Allen daall@microsoft.com

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

Signed-off-by: Danny Allen <daall@microsoft.com>
@lguohan
Copy link
Copy Markdown
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
Copy Markdown
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 <lawlee@microsoft.com>
Janetxxx pushed a commit to Janetxxx/sonic-swss that referenced this pull request Nov 10, 2025
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