From 53abf45cec6daaa83e971cc949a1b34fdcb93a3b Mon Sep 17 00:00:00 2001 From: Ganesh Nalawade Date: Thu, 14 Dec 2017 13:48:09 +0530 Subject: [PATCH] Add delay in junos integration test after netconf is enabled (#33899) junos integration test fails intermittently after task enables netconf on the remote host and the second task tries to create a persistent connection. Add a delay after the first task to ensure netconf is up running on remote host. --- .../targets/junos_netconf/tests/cli/changeport.yaml | 5 ++++- .../integration/targets/junos_netconf/tests/cli/netconf.yaml | 4 ++++ test/integration/targets/prepare_junos_tests/tasks/main.yml | 4 ++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/test/integration/targets/junos_netconf/tests/cli/changeport.yaml b/test/integration/targets/junos_netconf/tests/cli/changeport.yaml index 0d8ad9f02d..52c5c2ebb7 100644 --- a/test/integration/targets/junos_netconf/tests/cli/changeport.yaml +++ b/test/integration/targets/junos_netconf/tests/cli/changeport.yaml @@ -7,7 +7,6 @@ state: present register: result - ################################### - name: Change port junos_netconf: @@ -29,6 +28,10 @@ that: - "result.changed == false" +- name: wait for netconf server to come up + pause: + seconds: 10 + - name: Ensure we can communicate over 8022 junos_command: rpcs: diff --git a/test/integration/targets/junos_netconf/tests/cli/netconf.yaml b/test/integration/targets/junos_netconf/tests/cli/netconf.yaml index fbc0fe3bb6..e22834d2b0 100644 --- a/test/integration/targets/junos_netconf/tests/cli/netconf.yaml +++ b/test/integration/targets/junos_netconf/tests/cli/netconf.yaml @@ -18,6 +18,10 @@ ################################### +- name: wait for netconf server to come up + pause: + seconds: 10 + - name: Ensure we can communicate over netconf junos_command: rpcs: get-software-information diff --git a/test/integration/targets/prepare_junos_tests/tasks/main.yml b/test/integration/targets/prepare_junos_tests/tasks/main.yml index 91d8baad2d..21157493d6 100644 --- a/test/integration/targets/prepare_junos_tests/tasks/main.yml +++ b/test/integration/targets/prepare_junos_tests/tasks/main.yml @@ -7,3 +7,7 @@ - name: Ensure netconf is enabled junos_netconf: state: present + +- name: wait for netconf server to come up + pause: + seconds: 10