Add keepalive for root connection#4617
Conversation
| """ | ||
| try: | ||
| if self.root.sf is None: | ||
| assert self.root.connect() |
There was a problem hiding this comment.
Is root here a BlitzGateway or a BaseClient? In the latter case, I don't think there's a "connect" method. NB: an alternative option would be enableKeepAlive on the BaseClient but that will require cleaning them up, otherwise tests may hang.
There was a problem hiding this comment.
Yes, sorry, this is bad pasting from me and because nothing failed not looking further.
There was a problem hiding this comment.
Of course this also means this condition was never true and so is just a simple keepalive (the else clause) valid here of is it better to try to create the session again?
enableKeepAlive was mentioned in conversation with @jburel but I shied away from it because some of our tests don't clean up that well. Maybe this is something for a card when we do some test refactoring - as I am sure we will do.
There was a problem hiding this comment.
Maybe this is something for a card when we do some test refactoring - as I am sure we will do.
👍 -- or if this doesn't work 😄
|
Good to have it opened so we can hopefully have the tests green. |
|
Tested from home against eel. The same tests always fail w/o the change |
|
the "importAs" tests are passing this morning https://ci.openmicroscopy.org/view/OMERO-DEV/job/OMERO-DEV-merge-integration-python/262/ |
|
And the masses rejoice! |
|
Last few builds passed with the change. |
This an attempt to fix the three fails record on the card https://trello.com/c/EavoXnp4/649-importas-and-multigroup-cli-tests
This adds a
keepAlivefor the root connection so that the connection is still available when these three tests need it. This is the most minimal solution and appears to work when testing locally against a remote server - it needs this latency for the tests to take long enough for the connection to be lost, see below.Testing
The tests on Jenkins should pass, though given the intermittency the tests will need to be checked for a number of runs.
Local testing is possible though dependent on a slower connection. Set ice.config to point at
eel.openmicroscopy.org:24064and then:should pass cleanly.