Apple AHT occasionally freezing MacBook Pro late 2011 OS X Lion
Using AHT over a flaky Wi-Fi connection shouldn't cause any freezing, because the required software is downloaded in entirety first, and then run.

If you've been experiencing issues with the trackpad too, you might have a hardware issue with your Mac. I would look into the issue further, maybe by having Apple look at it.