This is not a doctor forum, but i will try to answer your question.
ur chance to get HIV virus is very low, but not zero, because the penis was not covered for the whole time.
if we talk about statistics, ur chance is low than 1/1000, maybe much lower.
but if this cannot ease ur mind, and u already know, that u might me need a test for the peace of mind. Please do at 6 weeks, and repeat at 12 weeks to get your conclusive negative result.
Be safe.
The chance of being infected from a very short exposure as you describe is unlikely to result in infection, But a risk is a risk and you will need testing to be sure you did not contract the virus. A test at 6-8 weeks is a very good indacator of your status but follow up with a 3 month test for your conclusive result.
My bet is you are fine. Good luck
Hope this helps!
Get a test 3 mths post exposure if you experienced unprotected penetration.