Skip to content

Commit

Permalink
update integration test (#2570)
Browse files Browse the repository at this point in the history
  • Loading branch information
qiuxin2012 authored and yiheng-wang-intel committed Jun 29, 2018
1 parent 72a635a commit d2d3323
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 131 deletions.
54 changes: 3 additions & 51 deletions spark/dl/src/test/common.robot
Original file line number Diff line number Diff line change
Expand Up @@ -7,62 +7,14 @@ Library OperatingSystem
Library XML

*** Keywords ***
Operate Vertical
[Documentation] Post operation to configuring service. Operation allowed: deploy, stop, suspend, resume, clear, reset
[Arguments] ${verticalId} ${operation} ${expectStatus}
Create Session host http://${ardaHost}:10021
Log To Console Operate vertical ${verticalId} with ${operation} ...
${resp}= Post Request host /vertical/${verticalId}/operation data=${operation}
${statusCode}= Convert To String ${resp.status_code}
Should Start With ${statusCode} 20
Wait Until Keyword Succeeds 10 min 5 sec Status Equal ${verticalId} ${expectStatus}

Status Equal
[Documentation] Match certain vertical's status
[Arguments] ${verticalId} ${status}
Create Session host http://${ardaHost}:10021
Log To Console Get vertical ${verticalId}'s status ...
${resp}= Get Request host /vertical/${verticalId}
${statusCode}= Convert To String ${resp.status_code}
Should Start With ${statusCode} 20
${json}= To Json ${resp.content}
Dictionary Should Contain Key ${json} status
${realStatus}= Get From Dictionary ${json} status
Log To Console Expected=${status}, Actual=${realStatus}
Should Be Equal As Strings ${status} ${realStatus}

BigDL Test
[Arguments] ${run_keyword} ${verticals}
@{verticalList}= Split String ${verticals} separator=,
:FOR ${vertical} IN @{verticalList}
\ Operate Vertical ${vertical} start running
\ Run KeyWord ${run_keyword}
[Teardown] Stop Verticals @{verticalList}

Stop Verticals
[Arguments] @{verticalList}
Remove Environment Variable http_proxy
:FOR ${vertical} IN @{verticalList}
\ Operate Vertical ${vertical} stop deployed/stopped

Check DataSource
Create Session webhdfs http://${public_hdfs_host}:50070
${resp}= Get Request webhdfs /webhdfs/v1/${imagenet}?op=GETFILESTATUS
Should Contain ${resp.content} DIRECTORY
${resp}= Get Request webhdfs /webhdfs/v1/${mnist}?op=GETFILESTATUS
Should Contain ${resp.content} DIRECTORY
${resp}= Get Request webhdfs /webhdfs/v1/${cifar}?op=GETFILESTATUS
Should Contain ${resp.content} DIRECTORY
[Arguments] ${run_keyword}
Log To Console Run keyword ${run_keyword}
Run KeyWord ${run_keyword}

Prepare DataSource And Verticals
Check DataSource
Check Verticals
Get BigDL Version

Check Verticals
:FOR ${vertical} IN @{verticals}
\ Status Equal ${vertical} deployed/stopped

Run Shell
[Arguments] ${program}
${rc} ${output}= Run and Return RC and Output ${program}
Expand Down
Loading

0 comments on commit d2d3323

Please sign in to comment.