Skip to content

Commit

Permalink
Give programs some time to start after calling Start Process
Browse files Browse the repository at this point in the history
This fixes #42
  • Loading branch information
WojtekKowaluk committed Aug 3, 2016
1 parent 3f271b1 commit 55bda00
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/test/robotframework/acceptance/remoteswinglibrary.robot
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ Start application removes the JAVA_TOOL_OPTIONS from enviroment

Connecting to a started application
Set java tool options
${handle}= Start Process java org.robotframework.remoteswinglibrary.MySwingApp shell=True
${handle}= Start And Wait java org.robotframework.remoteswinglibrary.MySwingApp
Application Started myjava
Exit and check process ${handle} myjava
Set environment variable JAVA_TOOL_OPTIONS ${EMPTY}

Connecting to a specific application
[Timeout] 30 seconds
Set java tool options
${handle1}= Start Process java org.robotframework.remoteswinglibrary.MySwingApp one shell=True
${handle2}= Start Process java org.robotframework.remoteswinglibrary.MySwingApp two shell=True
${handle3}= Start Process java org.robotframework.remoteswinglibrary.MySwingApp three shell=True
${handle1}= Start And Wait java org.robotframework.remoteswinglibrary.MySwingApp one
${handle2}= Start And Wait java org.robotframework.remoteswinglibrary.MySwingApp two
${handle3}= Start And Wait java org.robotframework.remoteswinglibrary.MySwingApp three
Application Started three name_contains=three
Application Started one name_contains=one
Application Started two name_contains=two
Expand All @@ -44,7 +44,7 @@ Connecting to an application and using java agent option
[Timeout] 20 seconds
${agent}= Set Variable -javaagent:"${REMOTESWINGLIBRARYPATH}"\=127.0.0.1:${REMOTESWINGLIBRARYPORT}
log ${agent}
${handle}= Start Process java ${agent} org.robotframework.remoteswinglibrary.MySwingApp shell=True
${handle}= Start And Wait java ${agent} org.robotframework.remoteswinglibrary.MySwingApp
Application Started app
Exit and check process ${handle} app

Expand Down Expand Up @@ -85,3 +85,9 @@ My Closing Keyword
Switch To Application ${alias}
Log something plaah
System Exit

Start And Wait
[Arguments] ${command}
${handle}= Start Process ${command} shell=True
Sleep 3s
[Return] ${handle}

0 comments on commit 55bda00

Please sign in to comment.