Copy tests from socket_import_stream