Small fixes to tests and threading

- Also tests varargs
- Added countdown latch for server disconnection with timeout
- Added some logging