OF-2559: Replacy busy-wait with Future callback
This intends to improve performance of outbound server session connections (and the corresponding unit tests), by replacing a busy-wait loop (is it done? sleep. is it done? sleep.) with a callback.
OF-2559: Make Netty graceful shutdown timeouts configurable
When shutting down Netty executors gracefully, a default set of timeout durations is used. In this commit, these durations are made configurable.
These properties are introduced:
- xmpp.socket.netty.graceful-shutdown.quiet-period
- xmpp.socket.netty.graceful-shutdown.timeout
The server-to-server unit tests make use of this to shut down Netty quickly.
OF-2611: Optimize runtime of server-to-server unit tests
When waiting gracefully to tear down the unit test fixture, a lot of time is spent. As the fixture isn't re-used anyway, force-closing things should not have any functional effect, but is a lot faster.
OF-2646: Disable database interaction when running unit tests
When running unit tests, the database isn't available. Trying to interact with it eats up resources, logs errors and throws exceptions.
With this commit, a flag is introduced that allows database interaction to be skipped when using JiveProperties.
Additionally, a dummy connection provider is used to initialize DbConnectionManager