From: aravind.est Date: Fri, 12 Jan 2024 11:19:17 +0000 (+0000) Subject: Fix build failure X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?p=sim%2Fa1-interface.git;a=commitdiff_plain;h=8873ea581307f1544b6ece3cb31b78c781ae032e Fix build failure Timeout introduced between the receiver start and call to receiver. Issue-ID: NONRTRIC-962 Signed-off-by: aravind.est Change-Id: I9631b0ea7e9d2e4c6277c7ae5c0088261fe25de4 --- diff --git a/near-rt-ric-simulator/tests/test_osc_2_1_0.py b/near-rt-ric-simulator/tests/test_osc_2_1_0.py index f5222c9..b54e417 100644 --- a/near-rt-ric-simulator/tests/test_osc_2_1_0.py +++ b/near-rt-ric-simulator/tests/test_osc_2_1_0.py @@ -1,5 +1,6 @@ # ============LICENSE_START=============================================== # Copyright (C) 2021-2023 Nordix Foundation. All rights reserved. +# Copyright (C) 2023-2024 OpenInfra Foundation Europe. All Rights Reserved # ======================================================================== # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -604,6 +605,9 @@ def test_sendstatus(client): test_data = get_testdata_dir() + 'pi2.json' header = { "Content-Type" : "application/json" } + # Timeout can be removed with polling the endpoints if required + proc.join(timeout=10) + # === Send status for pi2=== with open(test_data) as json_file: payload = json.load(json_file) diff --git a/near-rt-ric-simulator/tests/test_std_2_0_0.py b/near-rt-ric-simulator/tests/test_std_2_0_0.py index 0da2467..a21368c 100644 --- a/near-rt-ric-simulator/tests/test_std_2_0_0.py +++ b/near-rt-ric-simulator/tests/test_std_2_0_0.py @@ -1,5 +1,6 @@ # ============LICENSE_START=============================================== -# Copyright (C) 2021 Nordix Foundation. All rights reserved. +# Copyright (C) 2021-2023 Nordix Foundation. All rights reserved. +# Copyright (C) 2023-2024 OpenInfra Foundation Europe. All Rights Reserved # ======================================================================== # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -484,6 +485,9 @@ def test_sendstatus(client): test_data = get_testdata_dir() + 'pi2.json' header = { "Content-Type" : "application/json" } + # Timeout can be removed with polling the endpoints if required + proc.join(timeout=10) + # === Send status for pi2=== with open(test_data) as json_file: payload = json.load(json_file) diff --git a/tox.ini b/tox.ini index 023d9bf..7d421c5 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ # ================================================================================== # Copyright (c) 2020-2023 Nordix -# Copyright (C) 2023 OpenInfra Foundation Europe. All rights reserved. +# Copyright (C) 2023-2024 OpenInfra Foundation Europe. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -39,11 +39,11 @@ commands = ; Note that the second pytest (additional pytest added in the future) uses the 'append' flag to combine the coverage data ; from the previous tests. The first pytest shall not have the 'append' since the it is supposed to erase previous coverage data ; from earlier tox run. - pytest --cov {toxinidir}/near-rt-ric-simulator --cov-report xml --cov-report term-missing --cov-report html --cov-fail-under=70 \ + pytest -o log_cli=true --cov {toxinidir}/near-rt-ric-simulator --cov-report xml --cov-report term-missing --cov-report html --cov-fail-under=70 \ {toxinidir}/near-rt-ric-simulator/tests/test_osc_2_1_0.py - pytest --cov-append --cov {toxinidir}/near-rt-ric-simulator --cov-report xml --cov-report term-missing --cov-report html \ + pytest -o log_cli=true --cov-append --cov {toxinidir}/near-rt-ric-simulator --cov-report xml --cov-report term-missing --cov-report html \ --cov-fail-under=70 {toxinidir}/near-rt-ric-simulator/tests/test_std_1_1_3.py - pytest --cov-append --cov {toxinidir}/near-rt-ric-simulator --cov-report xml --cov-report term-missing --cov-report html \ + pytest -o log_cli=true --cov-append --cov {toxinidir}/near-rt-ric-simulator --cov-report xml --cov-report term-missing --cov-report html \ --cov-fail-under=70 {toxinidir}/near-rt-ric-simulator/tests/test_std_2_0_0.py coverage xml -i