Make StreamServer.close() tests more robust (GH-13790)

1 file changed