Skip to content

Commit

Permalink
Fix test_buffer_deployment case NoneType issue (#6050)
Browse files Browse the repository at this point in the history
What is the motivation for this PR?
Case test_buffer_deployment failed on the Broadcom devices.

How did you do it?
Init lossless headroom data for non-mellanox device

How did you verify/test it?
Re-run the failure case
  • Loading branch information
lipxu authored and wangxin committed Aug 4, 2022
1 parent 7feec08 commit 76556e8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/qos/test_buffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ def setup_module(duthosts, rand_one_dut_hostname, request):
duthost = duthosts[rand_one_dut_hostname]
detect_buffer_model(duthost)
if not is_mellanox_device(duthost):
load_lossless_headroom_data(duthost)
yield
return

Expand Down Expand Up @@ -2427,7 +2428,7 @@ def _check_port_buffer_info_and_return(duthost, table, ids, port, expected_profi
else:
if is_mellanox_device(duthost):
buffer_items_to_check = buffer_items_to_check_dict["down"]
elif is_broadcom_device(duthost) and (asic_type in ['td2'] or speed <= '10000'):
elif is_broadcom_device(duthost) and (asic_type in ['td2', 'td3'] or speed <= '10000'):
buffer_items_to_check = [(None, None, None)]
else:
buffer_items_to_check = [('BUFFER_PG_TABLE', '3-4', profile_wrapper.format(expected_profile))]
Expand Down

0 comments on commit 76556e8

Please sign in to comment.