Trying to work around race condition in a Groovy test.
Protecting better against getlasterror failure when using it to get the connectionId.