gc_sweep_all() cleans up sockets via the finaliser, but tests should cleanly free resources they use.