Skip to content

fix occasional type error in test_pfc_pause_extra_lossless_active#9049

Merged
XuChen-MSFT merged 1 commit intosonic-net:masterfrom
XuChen-MSFT:xuchen3/master/type-error-in-test_pfc_pause_extra_lossless_active
Jul 21, 2023
Merged

fix occasional type error in test_pfc_pause_extra_lossless_active#9049
XuChen-MSFT merged 1 commit intosonic-net:masterfrom
XuChen-MSFT:xuchen3/master/type-error-in-test_pfc_pause_extra_lossless_active

Conversation

@XuChen-MSFT
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)

Back port request

  • 201911
  • 202012
  • 202205

Approach

What is the motivation for this PR?

observed error in test_pfc_pause_extra_lossless_active:

20/07/2023 15:12:12 test_tunnel_qos_remap.pfc_pause_test     L0338 INFO   | exception (<class 'TypeError'>, TypeError("object of type 'int' has no len()"), <traceback object at 0x7fe6f02cb940>)

RCA:

the last parameter of pfc_pause_test() requrie list type, but, in some corner case,, "dualtor_meta['target_server_port']" is not list. so cause this error:

                if pfc_pause_test(storm_handler, peer_info, prio, ptfadapter, rand_selected_dut,
                                  dualtor_meta['selected_port'], queue, tunnel_pkt.exp_pkt, src_port, exp_pkt,
                                  dualtor_meta['target_server_port']):

How did you do it?

solution:
make sure the last parameter of pfc_pause_test() is list type.

How did you verify/test it?

Any platform specific information?

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

Documentation

@XuChen-MSFT XuChen-MSFT requested a review from bingwang-ms July 20, 2023 17:48
@XuChen-MSFT XuChen-MSFT requested a review from wsycqyz as a code owner July 20, 2023 17:48
Copy link
Copy Markdown
Contributor

@wsycqyz wsycqyz left a comment

Choose a reason for hiding this comment

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

LGTM

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.

4 participants