Fix flaky testcase test_reload_configuration_checks so slow device or device without clock chip can pass the test#10530
Fix flaky testcase test_reload_configuration_checks so slow device or device without clock chip can pass the test#10530gechiang merged 2 commits intosonic-net:masterfrom gechiang:master
Conversation
… allowed for database conainer to come up a little slower
|
The pre-commit check detected issues in the files touched by this pull request. Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
1 similar comment
|
The pre-commit check detected issues in the files touched by this pull request. Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
|
@vperumal Please check on this PR as why without this fix it is not failing for you? |
| # some device does not have onchip clock and requires obtaining system time a little later from ntp | ||
| # or SUP to obtain the correct time so if the uptime is less than original device time, it means it | ||
| # is most likely due to this issue which we can wait a little more until the correct time is set in place. | ||
| if float(dut_uptime.strftime("%s")) < float(dut_datetime.strftime("%s")): |
There was a problem hiding this comment.
Will it be always be the case that the time drifted backwards and not ahead?
There was a problem hiding this comment.
exactly! that is why this change is needed. in most platforms that has on board clock chip, there should be time difference that is "positive". For platform that does not have clock chip and rely on time sync and "slow" we will always hit this check and causes the testcase to failed prematurely...
… device without clock chip can pass the test (sonic-net#10530) * Fix flaky testcase test_reload_configuration_checks so slow device is allowed for database conainer to come up a little slower
|
Cherry-pick PR to 202305: #11016 |
… device without clock chip can pass the test (sonic-net#10530) * Fix flaky testcase test_reload_configuration_checks so slow device is allowed for database conainer to come up a little slower
|
Cherry-pick PR to 202205: #11017 |
… device without clock chip can pass the test (#10530) * Fix flaky testcase test_reload_configuration_checks so slow device is allowed for database conainer to come up a little slower
… device without clock chip can pass the test (#10530) * Fix flaky testcase test_reload_configuration_checks so slow device is allowed for database conainer to come up a little slower
Description of PR
With some vendors the device may be slow to come up where the database container that needs to be up before this testcase can run may not be ready with just 60 seconds wait time. And this change will allow eliminating false failure for slower devices.
In addition, some device may not have onboard clock chip and relies on the supervisor to provide the current timestamp so the check under common/reboot.py right after reboot occurred the timestamp may go negative. The check for timestamp to determine if reboot took place may end up concluding incorrectly. So this is also addressed in this PR as well.
Summary:
Fixes # (issue) (did not file issue)
Type of change
Back port request
Approach
What is the motivation for this PR?
To reduce flaky test results for some slower platforms and device without onboard clock chip.
How did you verify/test it?
Before the fix:
After the fix: