Tcpmd5user suite: Use pcc-mock in reconnecting mode
authorVratko Polak <vrpolak@cisco.com>
Tue, 5 May 2015 17:25:26 +0000 (19:25 +0200)
committerGerrit Code Review <gerrit@opendaylight.org>
Mon, 11 May 2015 19:01:35 +0000 (19:01 +0000)
The initial specification for TCPMD5 user-facing feature
system tests states that pcc-mock should be used in reconnecting mode.

Pcc-mock already supports --reconnect command line argument,
and some of the previous failures can be attributed to the fact
that this argument was not used in initial check-in of tcpmd5user suite.

This change makes pcc-mock reconnecting in 1 second intervals.

Also, test for not seeing prompt is more narrow now.

Change-Id: I07c36d111908aa0f70a3741f11e897d310aaf59c
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
test/csit/suites/bgpcep/tcpmd5user/tcpmd5user.robot

index 243a805e1abe58c16dd604d590d1610d30b267e9..a6b794a0e276326eef933666352621afc3303d19 100644 (file)
@@ -32,10 +32,10 @@ Topology_Precondition
 Start_Secure_Pcc_Mock
     [Documentation]    Execute pcc-mock on Mininet with password set, fail if pcc-mock returns. Keep pcc-mock running for next test cases.
     [Tags]    critical
-    ${command}=    Set_Variable    java -jar ${filename} --password topsecret --local-address ${MININET} --remote-address ${CONTROLLER} 2>&1 | tee pccmock.log
+    ${command}=    Set_Variable    java -jar ${filename} --password topsecret --reconnect 1 --local-address ${MININET} --remote-address ${CONTROLLER} 2>&1 | tee pccmock.log
     Log    ${command}
     Write    ${command}
-    Run_Keyword_And_Expect_Error    *    Read_Until_Prompt
+    Run_Keyword_And_Expect_Error    No match found for '${prompt}' in *.    Read_Until_Prompt
 
 Topology_Unauthorized_1
     [Documentation]    Try to catch a glimpse of pcc-mock in pcep-topology. Pass if no change from Precondition is detected over 1 minute.
@@ -130,6 +130,10 @@ Set_It_Up
     ...    Also, delete and create directories for json diff handling.
     Open_Connection    ${MININET}
     Login_With_Public_Key    ${MININET_USER}    ${USER_HOME}/.ssh/id_rsa    any
+    ${current_connection}=    Get_Connection
+    ${current_prompt}=    Set_Variable    ${current_connection.prompt}
+    Log    ${current_prompt}
+    Set_Suite_Variable    ${prompt}    ${current_prompt}
     Create_Session    ses    http://${CONTROLLER}:${RESTCONFPORT}/restconf/operational/network-topology:network-topology    auth=${AUTH}
     # TODO: Figure out a way how to share pcc-mock instance with pcepuser suite.
     ${urlbase}=    Set_Variable    ${NEXUSURL_PREFIX}/content/repositories/opendaylight.snapshot/org/opendaylight/bgpcep/pcep-pcc-mock