Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run tests in travis #22

Merged
merged 20 commits into from Dec 1, 2017
Merged

Run tests in travis #22

merged 20 commits into from Dec 1, 2017

Conversation

dominikl
Copy link
Member

Took over #14 from @joshmoore

@dominikl
Copy link
Member Author

Seems to run fine, until trying to connect to the test server:

omero.gateway.exception.DSOutOfServiceException: Can't connect to OMERO. OMERO info not valid

Might be just an issue with login credentials... what are the login credentials of the omero-test-daemon-c7 server?

What I also don't understand is, is the tests/testthat/init_testserver.sh script actually run after the docker test server is spun up? If not, from where I can launch that? And is omeroserver in tests/testthat/setup.csv really the correct hostname?

@dominikl
Copy link
Member Author

I will merge #21 and rebase this PR, with 5.3.3 there should be more information in the DSOutOfServiceException.

@dominikl
Copy link
Member Author

Argh, can't merge, no permission. Will rebase this PR onto #21 then instead.

@dominikl
Copy link
Member Author

Ok, the exception is Connection refused, so I guess omeroserver as hostname is wrong? Unfortunately I have no idea how this docker, travis thing works...

omero.gateway.exception.DSOutOfServiceException: java.net.ConnectException: Connection refused

@jburel
Copy link
Member

jburel commented Jul 4, 2017

There is an issue with the new images that travis uses and docker
you should try to add to the travis file
group: deprecated-2017Q2 since you require sudo
This workaround will have to be removed in few weeks (only available until September)

That's what I had to do in ome/omero-install#158

@dominikl dominikl mentioned this pull request Sep 22, 2017
@dominikl dominikl force-pushed the run-tests_dom branch 3 times, most recently from f4143e9 to 90f29a9 Compare November 21, 2017 16:36
@dominikl dominikl mentioned this pull request Nov 22, 2017
@dominikl dominikl force-pushed the run-tests_dom branch 7 times, most recently from 9c92466 to 27fc42c Compare November 22, 2017 14:17
@dominikl
Copy link
Member Author

I'm giving up on this, can't get the init_testserver.sh script to run on the omeroserver docker thing. Without setting up the testdata devtools::test() will obviously fail.

Since the used docker image already defines this
environment variable, a new prefix is needed.
The hard-coded IDs cause issues on a second run of the
script. Capturing the IDs in variables and re-using them
solves the problem.
@joshmoore joshmoore mentioned this pull request Nov 24, 2017
@joshmoore
Copy link
Member

In local tests I'm seeing:

8. Failure: Test Screen getImages (@test-SPW.R#54) -----------------------------
length(imgs) not equal to `plateSize`.
1/1 mismatches
[1] 192 - 64 == 128

which means that some of my changes will need looking into at a semantic level (i.e. handle unexpected data). cc: @dominikl

The travis build is failing with:

Warning messages:
1: replacing previous import ‘rJava::tail’ by ‘utils::tail’ when loading ‘romero.gateway’ 
2: replacing previous import ‘rJava::str’ by ‘utils::str’ when loading ‘romero.gateway’ 
3: replacing previous import ‘rJava::head’ by ‘utils::head’ when loading ‘romero.gateway’ 
> 
> # Retry connecting until server is up and running
> for (i in 1:60) {
+   server <- tryCatch(
+             {
+               server <- OMEROServer(
+                 host='omero',
+                 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
+ }
No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.
Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received

which I'll keep looking into.

@dominikl
Copy link
Member Author

dominikl commented Nov 25, 2017

Oh wow, you got it working, thanks @joshmoore ! Yes, looks like the expected values of the tests are not correct any longer, I'll update that, which should be simple now.
I check if it's possible that the tests get stuck in a loop somewhere (although I don't think so). Locally the tests run in about 1 - 2 min, definitely not exceeding 10min.

@dominikl
Copy link
Member Author

Everything seems to work now (incl integration tests), but still Done. Your build exited with 1. !?

@joshmoore
Copy link
Member

Hmm.... passing locally with:

$ docker cp .omeroci/test-data omero_omero_1:/tmp/data
$ docker exec -ti omero_omero_1 bash /tmp/data
$ docker run --link omero_omero_1:omero --net omero_default --rm test
...
...........................Rows:  150
Columns:  5
          Name Description      Type
1 Sepal.Length               numeric
2  Sepal.Width               numeric
3 Petal.Length               numeric
4  Petal.Width               numeric
5      Species             character
................
DONE ===========================================================================
Warning messages:
1: character(0)
2: character(0)
3: character(0)
>
>
$ echo $?
0

I'll try pushing the current state of test-omero and then re-build to see if we can get it green.

Note: this isn't yet idempotent. If test-data is run more than once, then the test fails.

@dominikl
Copy link
Member Author

Oh, so it's possible that test-data runs multiple times? Have to include a check then and only run if omero db is empty.

@joshmoore
Copy link
Member

Can discuss. I guess I'm less worried less about the "test-data has already been run once" than I am "some arbitrary data already exists".

@dominikl
Copy link
Member Author

I see. I'll overhaul the tests in a follow-up PR so that preexisting data doesn't break them.

@dominikl
Copy link
Member Author

Same again, tests pass, build exits with 1 :-/

@joshmoore
Copy link
Member

@dominikl : green!

@dominikl
Copy link
Member Author

Awesome, thanks @joshmoore !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants