acctz-3.1: increase ssh defer sleep for result consistency#5218
acctz-3.1: increase ssh defer sleep for result consistency#5218dipchauh wants to merge 3 commits intoopenconfig:mainfrom
Conversation
"This code is a Contribution to the OpenConfig Feature Profiles project ("Work") made under the Google Software Grant and Corporate Contributor License Agreement ("CLA") and governed by the Apache License 2.0. No other rights or licenses in or to any of Nokia's intellectual property are granted for any other purpose. This code is provided on an "as is" basis without any warranties of any kind."
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the reliability of SSH-related tests by extending the post-command delay before closing SSH connections. By increasing the sleep duration, the system ensures that all SSH operations, whether successful or failed CLI commands or shell commands, have fully processed and their outcomes are consistently captured, thereby mitigating intermittent test failures. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
Pull Request Functional Test Report for #5218 / ced9ad2Virtual Devices
Hardware Devices
|
There was a problem hiding this comment.
Code Review
This pull request increases the time.Sleep duration in three helper functions to fix an intermittent test failure. While this may resolve the immediate issue, it relies on non-deterministic timing and violates the repository's style guide which discourages the use of time.Sleep. I've added comments suggesting a refactor towards a more robust, deterministic waiting mechanism, such as polling for the expected accounting records, to improve test reliability and maintainability.
…tz3dot1
"This code is a Contribution to the OpenConfig Feature Profiles project ("Work") made under the Google Software Grant and Corporate Contributor License Agreement ("CLA") and governed by the Apache License 2.0. No other rights or licenses in or to any of Nokia's intellectual property are granted for any other purpose. This code is provided on an "as is" basis without any warranties of any kind."
"This code is a Contribution to the OpenConfig Feature Profiles project ("Work") made under the Google Software Grant and Corporate Contributor License Agreement ("CLA") and governed by the Apache License 2.0. No other rights or licenses in or to any of Nokia's intellectual property are granted for any other purpose. This code is provided on an "as is" basis without any warranties of any kind."
Increase the defer sleep time to 6s to ensure ssh commands complete before the connection closes and prevent intermittent test failures.
Also added check to not skip shell records
"This code is a Contribution to the OpenConfig Feature Profiles project ("Work") made under the Google Software Grant and Corporate Contributor License Agreement ("CLA") and governed by the Apache License 2.0. No other rights or licenses in or to any of Nokia's intellectual property are granted for any other purpose. This code is provided on an "as is" basis without any warranties of any kind."