Fix build failure 34/12434/21
authoraravind.est <aravindhan.a@est.tech>
Fri, 12 Jan 2024 11:19:17 +0000 (11:19 +0000)
committeraravind.est <aravindhan.a@est.tech>
Mon, 15 Jan 2024 13:48:38 +0000 (13:48 +0000)
Timeout introduced between the receiver start and call to receiver.

Issue-ID: NONRTRIC-962
Signed-off-by: aravind.est <aravindhan.a@est.tech>
Change-Id: I9631b0ea7e9d2e4c6277c7ae5c0088261fe25de4

near-rt-ric-simulator/tests/test_osc_2_1_0.py
near-rt-ric-simulator/tests/test_std_2_0_0.py
tox.ini

index f5222c9..b54e417 100644 (file)
@@ -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)
index 0da2467..a21368c 100644 (file)
@@ -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 (file)
--- 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