[OPTIM] Tune SDC delay before certification 62/121562/1
authormrichomme <morgan.richomme@orange.com>
Thu, 27 May 2021 06:59:31 +0000 (08:59 +0200)
committermrichomme <morgan.richomme@orange.com>
Thu, 27 May 2021 06:59:31 +0000 (08:59 +0200)
workaround to reduce the risk of race condition
add also a delay between VF creation on certification

Issue-ID: TEST-315

Signed-off-by: mrichomme <morgan.richomme@orange.com>
Change-Id: I811de68c92ddaf38431d0b6eb2d0fbc715478d5a

src/onaptests/steps/onboard/service.py
src/onaptests/steps/onboard/vf.py

index 8a7303b..ee2d3ab 100644 (file)
@@ -70,7 +70,7 @@ class ServiceOnboardStep(BaseStep):
         # checkin is done if needed
         # If service is replayed, no need to try to re-onboard the model
         if not service.distributed:
-            time.sleep(30)
+            time.sleep(10)
             service.checkin()
             service.onboard()
 
@@ -155,7 +155,7 @@ class YamlTemplateServiceOnboardStep(YamlTemplateBaseStep):
             except (APIError, ResourceNotFound):
                 # Retry as checkin may be a bit long
                 # Temp workaround to avoid internal race in SDC
-                time.sleep(5)
+                time.sleep(10)
                 service.checkin()
             service.onboard()
 
index c6582dd..7e4882e 100644 (file)
@@ -1,3 +1,5 @@
+import time
+
 from onapsdk.configuration import settings
 from onapsdk.sdc.vf import Vf
 from onapsdk.sdc.vsp import Vsp
@@ -98,4 +100,5 @@ class YamlTemplateVfOnboardStep(YamlTemplateBaseStep):
                             artifact_label=vnf["vnf_artifact_label"],
                             artifact=vnf["vnf_artifact_file_path"]
                         )
+                    time.sleep(10)
                     vf.onboard()