async def test_pool(self, max_connections, master_host):
        """
        A child will create its own connections when using a pool created
        by a parent.
        """
        pool = ConnectionPool.from_url(
            f"redis://{master_host}", max_connections=max_connections
        )

        conn = await pool.get_connection("ping")
        main_conn_pid = conn.pid
        async with exit_callback(pool.release, conn):
            await conn.send_command("ping")
            assert await conn.read_response() == b"PONG"

        def target(pool):
            async def atarget(pool):
                async with exit_callback(pool.disconnect):
                    conn = await pool.get_connection("ping")
                    assert conn.pid != main_conn_pid
                    async with exit_callback(pool.release, conn):
                        assert await conn.send_command("ping") is None
                        assert await conn.read_response() == b"PONG"

            asyncio.get_event_loop().run_until_complete(atarget(pool))

        proc = multiprocessing.Process(target=target, args=(pool,))
        proc.start()
        proc.join(3)
        assert proc.exitcode == 0

        # Check that connection is still alive after fork process has exited
        # and disconnected the connections in its pool
        conn = pool.get_connection("ping")
        async with exit_callback(pool.release, conn):
            assert await conn.send_command("ping") is None
            assert await conn.read_response() == b"PONG"

        A child will create its own connections when using a pool created
        by a parent.
        
tests/test_multiprocessing.py