Infection requires penetration of an unprotected penis inside a partner's vagina or anus. You were there so only you know if there was penetration or not. If yes then it's a risk and you should get tested with a 4th generation duo at 28 days post exposure. If no, then you had no risk and don't need to test.
This is just a suggestion but if you're a hypochondriac about HIV then you really should use condoms every time for piece of mind. It seems like common sense to use protection if you're just going to panic afterwards without it.