Skip to content

[Mellanox] Optimize dynamic minimum fan speed and psu fan speed test cases#3038

Merged
yxieca merged 1 commit intosonic-net:masterfrom
Junchao-Mellanox:optimize-psu-fan-speed
Feb 26, 2021
Merged

[Mellanox] Optimize dynamic minimum fan speed and psu fan speed test cases#3038
yxieca merged 1 commit intosonic-net:masterfrom
Junchao-Mellanox:optimize-psu-fan-speed

Conversation

@Junchao-Mellanox
Copy link
Copy Markdown
Contributor

Description of PR

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Approach

What is the motivation for this PR?

Improve test case test_dynamic_minimum_table and test_set_psu_fan_speed:

  1. remove time.sleep and replace with wait_until to make the test case more stable
  2. change global logger to local logger
  3. add more loggers to make the test result better undserstandable

How did you do it?

  1. remove time.sleep and replace with wait_until to make the test case more stable
  2. change global logger to local logger
  3. add more loggers to make the test result better undserstandable

How did you verify/test it?

Run the test cases with --count 20, all passed

Any platform specific information?

Mellanox

Supported testbed topology if it's a new test case?

N/A

Documentation

Comment on lines +104 to +107
cmd_output = str(duthost.command('show platform temperature')['stdout_lines'])
cmd_output = cmd_output.replace("u'", "").replace(',', " ")
cmd_output = re.split(r' +',cmd_output)
cmd_output.pop(0)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We need to add a --json flag to the show platform temperature command (and many other commands), so that we can more easily get the proper fields in instances like this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Agree.

@yxieca yxieca merged commit 6b43806 into sonic-net:master Feb 26, 2021
@Junchao-Mellanox Junchao-Mellanox deleted the optimize-psu-fan-speed branch October 29, 2021 01:45
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.

3 participants