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_070_run_sdntrace_untagged_vlan rerun on Jan 17, 2024 #278

Open
viniarck opened this issue Jan 17, 2024 · 0 comments
Open

test_070_run_sdntrace_untagged_vlan rerun on Jan 17, 2024 #278

viniarck opened this issue Jan 17, 2024 · 0 comments

Comments

@viniarck
Copy link
Member

sdntrace result timeout, we haven't had recent changes on this test case, so maybe it was an overload issue. Let's keep an eye on it, and see if wait/timeout needs to be adapted or not. It was just a rerun though, it passed in the next iteration.

tests/test_e2e_40_sdntrace.py::TestE2ESDNTrace::test_070_run_sdntrace_untagged_vlan: 2024-01-17,06:37:23.261563 - 2024-01-17,06:37:46.409047
cls = <tests.test_e2e_40_sdntrace.TestE2ESDNTrace object at 0x7fae14b284f0>

    def test_070_run_sdntrace_untagged_vlan(cls):
        """Run sdntrace_cp and sdntrace when vlan is untagged in evc"""

        cls.create_evc("untagged", interface_a="00:00:00:00:00:00:00:02:1", interface_z="00:00:00:00:00:00:00:03:1")
        time.sleep(10)

        payload = [
                    {
                        "trace": {
                            "switch": {
                                "dpid": "00:00:00:00:00:00:00:02",
                                "in_port": 1
                            }
                        }
                    }
        ]

        api_url = KYTOS_API + '/amlight/sdntrace_cp/v1/traces'
        response = requests.put(api_url, json=payload)
        assert response.status_code == 200, response.text
        data = response.json()
        list_results = data["result"]

        assert len(list_results[0]) == 2
        assert list_results[0][0]["dpid"] == "00:00:00:00:00:00:00:02"
        assert list_results[0][0]["port"] == 1
        assert list_results[0][-1]["type"] == "last"

        api_url = KYTOS_API + '/amlight/sdntrace/trace'
        response = requests.put(api_url, json=payload[0])
        assert response.status_code == 200, response.text
        data = response.json()
        assert "result" in data, data
        assert "trace_id" in data["result"], data
>       result = cls.wait_sdntrace_result(data["result"]["trace_id"])

tests/test_e2e_40_sdntrace.py:828:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <tests.test_e2e_40_sdntrace.TestE2ESDNTrace object at 0x7fae14b284f0>
trace_id = 30001, timeout = 10

    def wait_sdntrace_result(self, trace_id, timeout=10):
        """Wait until sdntrace finishes."""
        wait_count = 0
        while wait_count < timeout:
            try:
                api_url = KYTOS_API + '/amlight/sdntrace/trace'
                response = requests.get(f"{api_url}/{trace_id}")
                data = response.json()
                assert data["result"][-1]["reason"] == "done"
                break
            except:
                time.sleep(1)
                wait_count += 1
        else:
            msg = 'Timeout while waiting from sdntrace result.'
>           raise Exception(msg)
E           Exception: Timeout while waiting from sdntrace result.

tests/test_e2e_40_sdntrace.py:159: Exception
=========================== rerun test summary info ============================
RERUN tests/test_e2e_40_sdntrace.py::TestE2ESDNTrace::test_070_run_sdntrace_untagged_vlan
= 231 passed, 8 skipped, 9 xfailed, 7 xpassed, 1109 warnings, 1 rerun in 12195.65s (3:23:15) =
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