Added "Wait Until Keyword" instead of sleep
authorsenthil <senthil-b@hcl.com>
Sat, 18 Apr 2015 00:54:25 +0000 (17:54 -0700)
committerLuis Gomez <ecelgp@gmail.com>
Sat, 18 Apr 2015 03:02:22 +0000 (03:02 +0000)
Change-Id: Ia1be8bcaee9ef8bf171e3e6aba2a000131affcf4
Signed-off-by: senthil <senthil-b@hcl.com>
test/csit/suites/vtn/VTN_C_OF10/020__vtn_coordinator.txt
test/csit/suites/vtn/VTN_C_OF10/030__vtn_coordinator.txt
test/csit/suites/vtn/VTN_C_OF10/040__vtn_coordinator.txt
test/csit/suites/vtn/VTN_C_OF13/020__vtn_coordinator.txt
test/csit/suites/vtn/VTN_C_OF13/030__vtn_coordinator.txt
test/csit/suites/vtn/VTN_C_OF13/040__vtn_coordinator.txt

index 7ab79a03edc6d5ff15c2949dd7a9341b6f0512e3..63dace305f8e19e1ef411a94c1d804f76b72d32d 100644 (file)
@@ -20,31 +20,31 @@ Add a ODL Controller
 
 Verify the Controller Status is up
     [Documentation]    Check Controller status
-    [Tags]   vtnc 
-    Check Controller Status    odc_test
+    [Tags]   vtnc
+    Wait Until Keyword Succeeds   30s   2s   Check Controller Status   odc_test
 
 
 Add a Vtn Tenant1
     [Documentation]   Create Vtn Tenant1
-    [Tags]   vtnc 
+    [Tags]   vtnc
     Add a VTN  Tenant1  VTN_TEST
 
 
 Create VBR in VTN Tenant1
     [Documentation]   Create a VBR in Tenant1 as Vbridge1
-    [Tags]   vtnc 
+    [Tags]   vtnc
     Create VBR in VTN     Tenant1    Vbridge1    odc_test
 
 
 Create VBRIF in VBRIDGE Vbridge1 Interface1
     [Documentation]   Create an interface to Vbridge1
-    [Tags]   vtnc 
+    [Tags]   vtnc
     Create VBRIF in VBR   Tenant1    Vbridge1   Interface1  Interface1
 
 
 Create VBRIF in VBRIDGE Vbridge1 Interface2
     [Documentation]   Create an interface to Vbridge1
-    [Tags]   vtnc 
+    [Tags]   vtnc
     Create VBRIF in VBR   Tenant1    Vbridge1   Interface2  Interface2
 
 
@@ -56,14 +56,14 @@ Define Portmap for Interface1
 
 Define Portmap for Interface2
     [Documentation]   Map Interface2 to a logical port
-    [Tags]   vtnc 
+    [Tags]   vtnc
     Define Portmap for VBRIF    Tenant1    Vbridge1     Interface2    PP-OF:00:00:00:00:00:00:00:02-s2-eth1
 
 
 Test Ping for Configuration1
     [Documentation]   ping between hosts in mininet
-    [Tags]   vtnc 
-    Test Ping    h1    h3
+    [Tags]   vtnc
+    Wait Until Keyword Succeeds   30s   2s    Test Ping    h1    h3
 
 
 Delete a VTN Tenant1
@@ -99,7 +99,6 @@ Remove Controller
 Check Controller Status
    [Arguments]   ${ctrlname}
    [Documentation]    Get controller status
-   Sleep    15
    ${resp}    Get   session    ${VTNWEBAPI}/${CTRLS}/${ctrlname}.json
    ${contents}    To JSON    ${resp.content}
    ${controllerblock}    Get From Dictionary    ${contents}   controller
@@ -152,8 +151,6 @@ Define Portmap for VBRIF
 Test Ping
    [Arguments]   ${host1}    ${host2}
    [Documentation]  Ping hosts to check connectivity
-   Sleep   5
    Write    ${host1} ping -w 10 ${host2}
-   Sleep    10
    ${result}    Read
    Should Contain    ${result}    64 bytes
index cc10eea7024c6776824e5c0bdce42fe2c7ad4485..cf0ecbf0080b172a9e334812d0ed9ac358ea6c9d 100644 (file)
@@ -20,37 +20,37 @@ Add a ODL Controller
 Verify the Controller Status is up
     [Documentation]    Check Controller status
     [Tags]   vtnc
-    Check Controller Status    odc_test  up   20
+    Wait Until Keyword Succeeds   30s   2s   Check Controller Status   odc_test   up
 
 Verify switch1
     [Documentation]    Get switch1
     [Tags]   vtnc
-    Verify Switch    odc_test     00:00:00:00:00:00:00:01  30
+    Wait Until Keyword Succeeds   30s   2s   Verify Switch   odc_test   00:00:00:00:00:00:00:01
 
 Verify switch2
     [Documentation]    Get switch2
     [Tags]   vtnc
-    Verify Switch    odc_test     00:00:00:00:00:00:00:02  1
+    Wait Until Keyword Succeeds   30s   2s   Verify Switch   odc_test   00:00:00:00:00:00:00:02
 
 Verify switch3
     [Documentation]    Get switch3
     [Tags]   vtnc
-    Verify Switch    odc_test     00:00:00:00:00:00:00:03  1
+    Wait Until Keyword Succeeds   30s   2s   Verify Switch   odc_test   00:00:00:00:00:00:00:03
 
 Verify switchPort switch1
     [Documentation]   Get switchport/switch1
     [Tags]   vtnc
-    Verify SwitchPort    odc_test     00:00:00:00:00:00:00:01  15
+    Wait Until Keyword Succeeds   16s   2s   Verify SwitchPort   odc_test   00:00:00:00:00:00:00:01
 
 Verify switchPort switch2
     [Documentation]   Get switchport/switch2
     [Tags]   vtnc
-    Verify SwitchPort    odc_test     00:00:00:00:00:00:00:02  1
+    Wait Until Keyword Succeeds   16s   2s   Verify SwitchPort   odc_test   00:00:00:00:00:00:00:02
 
 Verify switchPort switch3
     [Documentation]   Get switchport/switch3
     [Tags]   vtnc
-    Verify SwitchPort    odc_test     00:00:00:00:00:00:00:03  1
+    Wait Until Keyword Succeeds   16s   2s   Verify SwitchPort   odc_test   00:00:00:00:00:00:00:03
 
 Delete a Controller
     [Documentation]   Delete Controller odc1
@@ -75,9 +75,8 @@ Remove Controller
    Should Be Equal As Strings    ${resp.status_code}    204
 
 Check Controller Status
-   [Arguments]   ${ctrlname}   ${stat}   ${sec}
+   [Arguments]   ${ctrlname}   ${stat}
    [Documentation]    Get controller status
-   Sleep    ${sec}
    ${resp}    Get   session    ${VTNWEBAPI}/${CTRLS}/${ctrlname}.json
    ${contents}    To JSON    ${resp.content}
    ${controllerblock}    Get From Dictionary    ${contents}   controller
@@ -85,9 +84,8 @@ Check Controller Status
    Should Be Equal As Strings    ${status}    ${stat}
 
 Verify Switch
-   [Arguments]   ${ctrlname}  ${switch_id}  ${sec}
+   [Arguments]   ${ctrlname}  ${switch_id}
    [Documentation]    Get switch
-   Sleep    ${sec}
    ${resp}    Get   session    ${VTNWEBAPI}/${CTRLS}/${ctrlname}/${SW}/${switch_id}.json
    ${contents}    To JSON    ${resp.content}
    ${switchblock}    Get From Dictionary    ${contents}   switch
@@ -95,8 +93,7 @@ Verify Switch
    Should Be Equal As Strings    ${status}     ${switch_id}
 
 Verify SwitchPort
-   [Arguments]   ${ctrlname}  ${switch_id}  ${sec}
+   [Arguments]   ${ctrlname}  ${switch_id}
    [Documentation]    Get switch
-   Sleep    ${sec}
    ${resp}    Get   session    ${VTNWEBAPI}/${CTRLS}/${ctrlname}/${SW}/${switch_id}/${PORTS}
    Should Be Equal As Strings    ${resp.status_code}    200
index 2fad4bb582490952901df2d76f571f1a1207d5cb..b790bd71d0b517f46ed703a29e1ec669d311d6a1 100644 (file)
@@ -19,7 +19,7 @@ Add a ODL Controller
 Verify the Controller Status is up
     [Documentation]    Check Controller status
     [Tags]   vtnc
-    Check Controller Status    odc_test   up   20
+    Wait Until Keyword Succeeds   30s   2s  Check Controller Status    odc_test   up
 
 Add a Vtn Tenant1
     [Documentation]   Create Vtn Tenant1
@@ -39,7 +39,7 @@ Update controller ip invalid
 Verify the Controller State is down
     [Documentation]    Check Controller status
     [Tags]   vtnc
-    Check Controller Status    odc_test   down   45
+    Wait Until Keyword Succeeds   40s   2s   Check Controller Status    odc_test   down
 
 Create VBRIF in VBRIDGE Vbridge1 Interface1
     [Documentation]   Create an interface to Vbridge1
@@ -59,7 +59,7 @@ Update controller ip valid
 Verify the Controller State is up
     [Documentation]    Check Controller status
     [Tags]   vtnc
-    Check Controller Status    odc_test   up   45
+    Wait Until Keyword Succeeds   40s   2s   Check Controller Status    odc_test   up
 
 Define Portmap for Interface1
     [Documentation]   Map Interface1 to a logical port
@@ -74,7 +74,7 @@ Define Portmap for Interface2
 Test Ping for Configuration1
     [Documentation]   ping between hosts in mininet
     [Tags]   vtnc
-    Test Ping    h1    h2
+    Wait Until Keyword Succeeds   40s   2s    Test Ping    h1    h2
 
 Delete a VTN Tenant1
     [Documentation]   Delete Vtn Tenant1
@@ -114,9 +114,8 @@ Update Controller
 
 
 Check Controller Status
-   [Arguments]   ${ctrlname}   ${stat}   ${sec}
+   [Arguments]   ${ctrlname}   ${stat}
    [Documentation]    Get controller status
-   Sleep    ${sec}
    ${resp}    Get   session    ${VTNWEBAPI}/${CTRLS}/${ctrlname}.json
    ${contents}    To JSON    ${resp.content}
    ${controllerblock}    Get From Dictionary    ${contents}   controller
@@ -169,8 +168,6 @@ Define Portmap for VBRIF
 Test Ping
    [Arguments]   ${host1}    ${host2}
    [Documentation]  Ping hosts to check connectivity
-   Sleep   5
    Write    ${host1} ping -w 10 ${host2}
-   Sleep    10
    ${result}    Read
    Should Contain    ${result}    64 bytes
index 7ab79a03edc6d5ff15c2949dd7a9341b6f0512e3..c55ab98b48c7d4762a0a0b650c7c84304986511d 100644 (file)
@@ -20,31 +20,31 @@ Add a ODL Controller
 
 Verify the Controller Status is up
     [Documentation]    Check Controller status
-    [Tags]   vtnc 
-    Check Controller Status    odc_test
+    [Tags]   vtnc
+    Wait Until Keyword Succeeds    30s    2s    Check Controller Status    odc_test    up
 
 
 Add a Vtn Tenant1
     [Documentation]   Create Vtn Tenant1
-    [Tags]   vtnc 
+    [Tags]   vtnc
     Add a VTN  Tenant1  VTN_TEST
 
 
 Create VBR in VTN Tenant1
     [Documentation]   Create a VBR in Tenant1 as Vbridge1
-    [Tags]   vtnc 
+    [Tags]   vtnc
     Create VBR in VTN     Tenant1    Vbridge1    odc_test
 
 
 Create VBRIF in VBRIDGE Vbridge1 Interface1
     [Documentation]   Create an interface to Vbridge1
-    [Tags]   vtnc 
+    [Tags]   vtnc
     Create VBRIF in VBR   Tenant1    Vbridge1   Interface1  Interface1
 
 
 Create VBRIF in VBRIDGE Vbridge1 Interface2
     [Documentation]   Create an interface to Vbridge1
-    [Tags]   vtnc 
+    [Tags]   vtnc
     Create VBRIF in VBR   Tenant1    Vbridge1   Interface2  Interface2
 
 
@@ -56,14 +56,14 @@ Define Portmap for Interface1
 
 Define Portmap for Interface2
     [Documentation]   Map Interface2 to a logical port
-    [Tags]   vtnc 
+    [Tags]   vtnc
     Define Portmap for VBRIF    Tenant1    Vbridge1     Interface2    PP-OF:00:00:00:00:00:00:00:02-s2-eth1
 
 
 Test Ping for Configuration1
     [Documentation]   ping between hosts in mininet
-    [Tags]   vtnc 
-    Test Ping    h1    h3
+    [Tags]   vtnc
+    Wait Until Keyword Succeeds    30s    5s   Test Ping    h1    h3
 
 
 Delete a VTN Tenant1
@@ -97,14 +97,13 @@ Remove Controller
 
 
 Check Controller Status
-   [Arguments]   ${ctrlname}
+   [Arguments]   ${ctrlname}  ${stat}
    [Documentation]    Get controller status
-   Sleep    15
    ${resp}    Get   session    ${VTNWEBAPI}/${CTRLS}/${ctrlname}.json
    ${contents}    To JSON    ${resp.content}
    ${controllerblock}    Get From Dictionary    ${contents}   controller
    ${status}    Get From Dictionary    ${controllerblock}     operstatus
-   Should Be Equal As Strings    ${status}    up
+   Should Be Equal As Strings    ${status}    ${stat}
 
 
 Add a VTN
@@ -152,8 +151,6 @@ Define Portmap for VBRIF
 Test Ping
    [Arguments]   ${host1}    ${host2}
    [Documentation]  Ping hosts to check connectivity
-   Sleep   5
    Write    ${host1} ping -w 10 ${host2}
-   Sleep    10
    ${result}    Read
    Should Contain    ${result}    64 bytes
index cc10eea7024c6776824e5c0bdce42fe2c7ad4485..032b4318042d8621c55d02d115a969aae60c383d 100644 (file)
@@ -20,37 +20,37 @@ Add a ODL Controller
 Verify the Controller Status is up
     [Documentation]    Check Controller status
     [Tags]   vtnc
-    Check Controller Status    odc_test  up   20
+    Wait Until Keyword Succeeds    30s    2s    Check Controller Status     odc_test     up
 
 Verify switch1
     [Documentation]    Get switch1
     [Tags]   vtnc
-    Verify Switch    odc_test     00:00:00:00:00:00:00:01  30
+    Wait Until Keyword Succeeds    30s    2s    Verify Switch    odc_test    00:00:00:00:00:00:00:01
 
 Verify switch2
     [Documentation]    Get switch2
     [Tags]   vtnc
-    Verify Switch    odc_test     00:00:00:00:00:00:00:02  1
+    Wait Until Keyword Succeeds    30s    2s    Verify Switch    odc_test    00:00:00:00:00:00:00:02
 
 Verify switch3
     [Documentation]    Get switch3
     [Tags]   vtnc
-    Verify Switch    odc_test     00:00:00:00:00:00:00:03  1
+    Wait Until Keyword Succeeds    30s    2s    Verify Switch    odc_test    00:00:00:00:00:00:00:03
 
 Verify switchPort switch1
     [Documentation]   Get switchport/switch1
     [Tags]   vtnc
-    Verify SwitchPort    odc_test     00:00:00:00:00:00:00:01  15
+    Wait Until Keyword Succeeds    30s    2s    Verify SwitchPort    odc_test    00:00:00:00:00:00:00:01
 
 Verify switchPort switch2
     [Documentation]   Get switchport/switch2
     [Tags]   vtnc
-    Verify SwitchPort    odc_test     00:00:00:00:00:00:00:02  1
+    Wait Until Keyword Succeeds    30s    2s    Verify SwitchPort    odc_test    00:00:00:00:00:00:00:02
 
 Verify switchPort switch3
     [Documentation]   Get switchport/switch3
     [Tags]   vtnc
-    Verify SwitchPort    odc_test     00:00:00:00:00:00:00:03  1
+    Wait Until Keyword Succeeds    30s    2s    Verify SwitchPort    odc_test    00:00:00:00:00:00:00:03
 
 Delete a Controller
     [Documentation]   Delete Controller odc1
@@ -75,9 +75,8 @@ Remove Controller
    Should Be Equal As Strings    ${resp.status_code}    204
 
 Check Controller Status
-   [Arguments]   ${ctrlname}   ${stat}   ${sec}
+   [Arguments]   ${ctrlname}   ${stat}
    [Documentation]    Get controller status
-   Sleep    ${sec}
    ${resp}    Get   session    ${VTNWEBAPI}/${CTRLS}/${ctrlname}.json
    ${contents}    To JSON    ${resp.content}
    ${controllerblock}    Get From Dictionary    ${contents}   controller
@@ -85,9 +84,8 @@ Check Controller Status
    Should Be Equal As Strings    ${status}    ${stat}
 
 Verify Switch
-   [Arguments]   ${ctrlname}  ${switch_id}  ${sec}
+   [Arguments]   ${ctrlname}  ${switch_id}
    [Documentation]    Get switch
-   Sleep    ${sec}
    ${resp}    Get   session    ${VTNWEBAPI}/${CTRLS}/${ctrlname}/${SW}/${switch_id}.json
    ${contents}    To JSON    ${resp.content}
    ${switchblock}    Get From Dictionary    ${contents}   switch
@@ -95,8 +93,7 @@ Verify Switch
    Should Be Equal As Strings    ${status}     ${switch_id}
 
 Verify SwitchPort
-   [Arguments]   ${ctrlname}  ${switch_id}  ${sec}
+   [Arguments]   ${ctrlname}  ${switch_id}
    [Documentation]    Get switch
-   Sleep    ${sec}
    ${resp}    Get   session    ${VTNWEBAPI}/${CTRLS}/${ctrlname}/${SW}/${switch_id}/${PORTS}
    Should Be Equal As Strings    ${resp.status_code}    200
index 2fad4bb582490952901df2d76f571f1a1207d5cb..ddb8782c245184e7c7a46c3c699c3b0e8700fa1b 100644 (file)
@@ -19,7 +19,7 @@ Add a ODL Controller
 Verify the Controller Status is up
     [Documentation]    Check Controller status
     [Tags]   vtnc
-    Check Controller Status    odc_test   up   20
+    Wait Until Keyword Succeeds    30s    2s    Check Controller Status    odc_test    up
 
 Add a Vtn Tenant1
     [Documentation]   Create Vtn Tenant1
@@ -39,7 +39,7 @@ Update controller ip invalid
 Verify the Controller State is down
     [Documentation]    Check Controller status
     [Tags]   vtnc
-    Check Controller Status    odc_test   down   45
+    Wait Until Keyword Succeeds    40s    2s   Check Controller Status    odc_test   down
 
 Create VBRIF in VBRIDGE Vbridge1 Interface1
     [Documentation]   Create an interface to Vbridge1
@@ -59,7 +59,7 @@ Update controller ip valid
 Verify the Controller State is up
     [Documentation]    Check Controller status
     [Tags]   vtnc
-    Check Controller Status    odc_test   up   45
+    Wait Until Keyword Succeeds    40s    2s   Check Controller Status    odc_test   up
 
 Define Portmap for Interface1
     [Documentation]   Map Interface1 to a logical port
@@ -74,7 +74,7 @@ Define Portmap for Interface2
 Test Ping for Configuration1
     [Documentation]   ping between hosts in mininet
     [Tags]   vtnc
-    Test Ping    h1    h2
+    Wait Until Keyword Succeeds    30s    2s    Test Ping    h1    h2
 
 Delete a VTN Tenant1
     [Documentation]   Delete Vtn Tenant1
@@ -114,9 +114,8 @@ Update Controller
 
 
 Check Controller Status
-   [Arguments]   ${ctrlname}   ${stat}   ${sec}
+   [Arguments]   ${ctrlname}   ${stat}
    [Documentation]    Get controller status
-   Sleep    ${sec}
    ${resp}    Get   session    ${VTNWEBAPI}/${CTRLS}/${ctrlname}.json
    ${contents}    To JSON    ${resp.content}
    ${controllerblock}    Get From Dictionary    ${contents}   controller
@@ -169,8 +168,6 @@ Define Portmap for VBRIF
 Test Ping
    [Arguments]   ${host1}    ${host2}
    [Documentation]  Ping hosts to check connectivity
-   Sleep   5
    Write    ${host1} ping -w 10 ${host2}
-   Sleep    10
    ${result}    Read
    Should Contain    ${result}    64 bytes