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_smoke_mab test flake #269

Open
gizmoguy opened this issue Jul 1, 2021 · 0 comments
Open

test_smoke_mab test flake #269

gizmoguy opened this issue Jul 1, 2021 · 0 comments
Assignees

Comments

@gizmoguy
Copy link
Member

gizmoguy commented Jul 1, 2021

Occasionally the MabTest.test_smoke_mab integration test fails for this reason:

 =================================== FAILURES ===================================
____________________________ MabTest.test_smoke_mab ____________________________

self = <test_mab.MabTest testMethod=test_smoke_mab>

    def test_smoke_mab(self):
        """Perform MAB using dhclient"""
        self.start_dhclient()
        time.sleep(5)
>       self.check_output()

chewie-src/test/integration/test_mab.py:21: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <test_mab.MabTest testMethod=test_smoke_mab>, kwargs = {}
file = <_io.TextIOWrapper name='/tmp/logs/chewie-MabTest-tgl5j990/chewie.log' mode='r' encoding='UTF-8'>
chewie_log = '2021-07-01 21:41:55,688 - CHEWIE - INFO - Starting chewie.\n2021-07-01 21:41:55,695 - CHEWIE.Chewie - INFO - Starting...EWIE.Chewie - INFO - waiting for MAB activity.\n2021-07-01 21:41:55,738 - CHEWIE.Chewie - INFO - waiting for radius.\n'
chewie_requirements = None

    def check_output(self, **kwargs):  # pylint: disable=no-self-use
        """Check the output of the Log Files to verify state of system"""
    
        with open(os.path.join(self.current_log_dir + "chewie.log"), "r") as file:
            chewie_log = file.read()
    
        chewie_requirements = kwargs.get("chewie_requirements", None)
        if chewie_requirements:
            for requirement in chewie_requirements:
                assert requirement in chewie_log, "Unable to find {} in chewie logs".format(
                    requirement, )
    
        currentframe = inspect.currentframe()
        assert currentframe
    
        if currentframe:
>           assert "Authentication successful" in chewie_log, "Authentication failed for {}".format(
                currentframe.f_back.f_code.co_name)
E           AssertionError: Authentication failed for test_smoke_mab
E           assert 'Authentication successful' in '2021-07-01 21:41:55,688 - CHEWIE - INFO - Starting chewie.\n2021-07-01 21:41:55,695 - CHEWIE.Chewie - INFO - Starting...EWIE.Chewie - INFO - waiting for MAB activity.\n2021-07-01 21:41:55,738 - CHEWIE.Chewie - INFO - waiting for radius.\n'

chewie-src/test/integration/base_test.py:229: AssertionError
----------------------------- Captured stdout call -----------------------------
@anarkiwi anarkiwi self-assigned this Jul 8, 2021
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

2 participants