Hello,
Unprotected penetration (even a brief one) poses a risk of HIV transmission (low for this incident but STILL a risk).
An HIV test at the right time will give you accurate results.
A 4th generation test should be done at 4 weeks post exposure and a simple HIV test at three months post exposure.
Keep calm and test at the right time.