Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test_vlan.py #2541

Merged
merged 1 commit into from
Dec 19, 2022
Merged

Fix test_vlan.py #2541

merged 1 commit into from
Dec 19, 2022

Conversation

lolyu
Copy link
Contributor

@lolyu lolyu commented Nov 22, 2022

What I did
The signature of wait_for_n_keys is:

def wait_for_n_keys(
    self,
    table_name,
    num_keys,
    wait_at_least_n_keys,
    polling_config = PollingConfig(),
    failure_message = None,
):

In the following methods:
DVSVlan.get_and_verify_vlan_ids
DVSVlan.get_and_verify_vlan_hostif_ids

They pass polling_config as the third argument, stored in the parameter wait_at_least_n_keys and always evaluated to True. This will cause trouble in the vlan or vlan interface removal, wait_for_n_keys will always return early as there are always more than expected keys existing in the table. So when next testcase starts, those keys might still exist in the table and fail the next testcase.

Signed-off-by: Longxiang Lyu [email protected]

Why I did it
Stabilize test_vlan.py

How I verified it

Details if related

The signature of `wait_for_n_keys` is:

def wait_for_n_keys(
    self,
    table_name,
    num_keys,
    wait_at_least_n_keys,
    polling_config = PollingConfig(),
    failure_message = None,
):

In the following methods:
DVSVlan.get_and_verify_vlan_ids
DVSVlan.get_and_verify_vlan_hostif_ids

They pass polling_config as the third argument, stored as parameter
wait_at_least_n_keys. This will cause trouble in the vlan or vlan
interface removal, wait_for_n_keys will return early as there are always
more than expected keys existing in the table. This will fail the next
testcase sometimes.

Signed-off-by: Longxiang Lyu <[email protected]>
@lolyu
Copy link
Contributor Author

lolyu commented Nov 22, 2022

/azp run Azure.sonic-swss

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@yxieca
Copy link
Contributor

yxieca commented Nov 27, 2022

@lolyu can you look into the vstest failure?

@prsunny
Copy link
Collaborator

prsunny commented Dec 9, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

vmittal-msft added a commit to vmittal-msft/sonic-swss that referenced this pull request Dec 9, 2022
vmittal-msft added a commit to vmittal-msft/sonic-swss that referenced this pull request Dec 9, 2022
vmittal-msft added a commit to vmittal-msft/sonic-swss that referenced this pull request Dec 10, 2022
vmittal-msft added a commit to vmittal-msft/sonic-swss that referenced this pull request Dec 10, 2022
@lolyu
Copy link
Contributor Author

lolyu commented Dec 14, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

vmittal-msft added a commit to vmittal-msft/sonic-swss that referenced this pull request Dec 18, 2022
Updated swss with latest from master

temp check in

review feedback

Commented out test for chassis

fix for compilation issue

Fixed test failure

feedback comments

fix for processQ

fix for processQ

fix for processQ

mock test update

test_vlan.py fix

skipping failing test for virtual chassis

disable test_PortAutoNegWarm test

minor fix

disabling virtual chassis tests for now

temp check in

unskip failing test

unkipped sonic-net#2 test

fix minor errors

temporarily disable test as PR sonic-net#2541 is having the fix
@lolyu
Copy link
Contributor Author

lolyu commented Dec 19, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@prsunny prsunny merged commit 44d1e9c into sonic-net:master Dec 19, 2022
vmittal-msft added a commit to vmittal-msft/sonic-swss that referenced this pull request Dec 20, 2022
Updated swss with latest from master

temp check in

review feedback

Commented out test for chassis

fix for compilation issue

Fixed test failure

feedback comments

fix for processQ

fix for processQ

fix for processQ

mock test update

test_vlan.py fix

skipping failing test for virtual chassis

disable test_PortAutoNegWarm test

minor fix

disabling virtual chassis tests for now

temp check in

unskip failing test

unkipped sonic-net#2 test

fix minor errors

temporarily disable test as PR sonic-net#2541 is having the fix
lolyu added a commit that referenced this pull request Jan 4, 2023
What I did
Cherry-pick back #2469 into 202205.

Why I did it
It is reverted in 202205: #2518 because of the flakiness of test_vlan.py

How I verified it
This depends on the following PRs:
#2504
#2541
yxieca pushed a commit that referenced this pull request Jan 4, 2023
[VS] Fix Vlan test for the signature of wait_for_n_keys
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