Skip to content

Commit

Permalink
Make sure server is running before running tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikl committed Nov 21, 2017
1 parent 85db38b commit 90a8252
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
sudo: required
group: deprecated-2017Q2

language: python

Expand Down
23 changes: 23 additions & 0 deletions docker/runtest
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
#!/usr/bin/env bash
cat <<EOF | R --no-save
library(devtools)
library(romero.gateway)
# Retry connecting until server is up and running
for (i in 1:60) {
server <- tryCatch(
{
server <- OMEROServer(host='omeroserver', port=4064, username='root', password='omero')
server <- connect(server)
return(server)
},
error=function(cond) {
Sys.sleep(10)
return(NA)
},
warning=function(cond) {
},
finally={
}
)
if (!is.na(server))
break
}
devtools::test()
EOF

0 comments on commit 90a8252

Please sign in to comment.