Unprotected sex carries a risk for HIV, assuming your partner is HIV positive. If your partner is HIV negative, then obviously it's not a risk. But if your partner is HIV positive then you had a risk and you will need to get tested. A 4th generation duo test is conclusive anytime 28 days after exposure.
I agree. You will need to test at the appropriate time which is 28 days or beyond with a 4th generation duo test. The odds are low from a one time exposure of less than 2 percent. I would try not to overly worry but do get tested.
5 seconds of penetration with the tip of the penis? Are you sure it was penetration or you are just wondering it to be? Perhaps rubbing or your anal opening touching the penis isn't exactly a penetration.
If indeed, it was penetration, despite of the fact that it was anal intercourse, it can be deemed as low risk event due to the brief exposure. Also, assurance offered to you by your partner can't be ignored, people usually don't lie about their HIV status.
If you are confident that there was penetration, you can take the test. Details of the test and timeline is already provided by my fellow volunteers.