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

gNOI Cold Reboot - Integrated tests #20711

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

rkavitha-hcl
Copy link

Why I did it

Work item tracking
  • Microsoft ADO (number only):

How I did it

How to verify it

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

Tested branch (Please provide the tested image version)

Description for the changelog

Added UT cases for Cold Reboot feature

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@rkavitha-hcl rkavitha-hcl requested a review from lguohan as a code owner November 6, 2024 07:36
@rkavitha-hcl rkavitha-hcl force-pushed the gnoi_cr_PR3 branch 3 times, most recently from d4ba3f9 to ad91226 Compare November 18, 2024 09:46
@kishanps
Copy link

@hdwhdw @vvolam @qiluo-msft Pls review

src/sonic-framework/tests/test_utils_common.cpp Outdated Show resolved Hide resolved
src/sonic-framework/tests/test_utils_common.h Outdated Show resolved Hide resolved
src/sonic-framework/tests/mock_reboot_interfaces.h Outdated Show resolved Hide resolved
src/sonic-framework/tests/reboot_thread_test.cpp Outdated Show resolved Hide resolved
src/sonic-framework/tests/reboot_common_test.cpp Outdated Show resolved Hide resolved
src/sonic-framework/tests/rebootbe_test.cpp Outdated Show resolved Hide resolved
src/sonic-framework/tests/rebootbe_test.cpp Outdated Show resolved Hide resolved
Comment on lines 23 to 28
#define ONE_SECOND (1)
#define TWO_SECONDS (2)
#define TENTH_SECOND_MS (100)
#define HALF_SECOND_MS (500)
#define ONE_SECOND_MS (1000)
#define FIFTEEN_HUNDRED_MS (1500)
#define TWO_SECONDS_MS (2000)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a level of indirection that make it:

  1. Hard to change going forward.
  2. Does not enforce units (miliseconds, seconds), i.e. there is nothing that prevents you to write a ONE_SECOND in a parameter which expect miliseconds.

It is of high risk of introducing bugs for unsuspecting maintainers. Please remove it.

For Google code, consider using https://abseil.io/docs/cpp/guides/time

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a challenge in using absl. So, retaining this code

src/sonic-framework/tests/rebootbe_test.cpp Outdated Show resolved Hide resolved
src/sonic-framework/tests/redis_utils_test.cpp Outdated Show resolved Hide resolved
@rkavitha-hcl rkavitha-hcl force-pushed the gnoi_cr_PR3 branch 4 times, most recently from 8c4cb6c to efa4a2b Compare December 3, 2024 08:13
@rkavitha-hcl rkavitha-hcl force-pushed the gnoi_cr_PR3 branch 5 times, most recently from 663ac61 to 8d52b9b Compare December 4, 2024 14:30
@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants