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

test_logoff_dot1x test flake #270

Open
gizmoguy opened this issue Jul 2, 2021 · 1 comment
Open

test_logoff_dot1x test flake #270

gizmoguy opened this issue Jul 2, 2021 · 1 comment

Comments

@gizmoguy
Copy link
Member

gizmoguy commented Jul 2, 2021

Occasionally the ChewieTestCase.test_logoff_dot1x unit test fails for this reason:

_______________________ ChewieTestCase.test_logoff_dot1x _______________________

self = <test_chewie.ChewieTestCase testMethod=test_logoff_dot1x>

    @patch('chewie.chewie.get_random_id', get_random_id_helper)
    @patch('chewie.chewie.EapSocket', FakeEapSocket)
    @patch('chewie.chewie.RadiusSocket', FakeRadiusSocket)
    @patch('chewie.chewie.MabSocket', FakeMabSocket)
    @patch('chewie.chewie.RadiusLifecycle.generate_request_authenticator', urandom_helper)
    @patch('chewie.chewie.FullEAPStateMachine.next_id', next_id)
    def wrapper_patch(self):
>       func(self)

test/unit/test_chewie.py:42: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
test/unit/test_chewie.py:61: in wrapper_setup_gen
    func(self)
test/unit/test_chewie.py:436: in test_logoff_dot1x
    FullEAPStateMachine.LOGOFF2)
E   AssertionError: 'SUCCESS2' != 'LOGOFF2'
E   - SUCCESS2
E   + LOGOFF2
@gizmoguy
Copy link
Member Author

gizmoguy commented Jul 6, 2021

8a2e9f3 seems to reduce how often this fails, however a better fix than increasing the sleep would be to add a helper which waits until it detects statemachine moving to new state.

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

No branches or pull requests

1 participant