Why not add a new test? If this one fails, you'll need to debug to see whether it's an issue with the server not closing properly, or the code that should wait for the server close before calling the callback.