You did not have any risk. Even if we assume (for the sake of worrying) that the other guy is hiv positive, and even if we assume (again for the sake of worrying) that he has a high viral load, the HIV viruses present in his precum would have been inactivated when they came into contact with air. HIV is a very fragile virus, and it takes only a moment for them to be inactivated. By the time they were inside your rectum, they would have become non infectious. No need to test. :)
thanks for your answer. Just thinking that there was his precum on the outside of the condom, and the outside of the condom contacted with my rectum, that might cause some risk.
You can't get HIV when you use a condom or from touching HIV. You had zero risk.
HIV is instantly inactivated in air and also in saliva which means it is effectively dead so it can't infect from touching, external rubbing or oral activities. It doesn't matter if you and they were actively bleeding or had cuts at the time either because the HIV is effectively dead.
Only 3 adult risks are the following:
1. unprotected penetrating vaginal
2. unprotected penetrating anal sex
3. sharing needles that you inject with. Knowing these 3 are all you need to know to protect yourself against HIV. The situation you describe is a long way from any of these 3.
Even with blood, lactation, cuts, rashes, burns, etc the air or the saliva does not allow inactivated virus to infect from touching, external rubbing or oral activities. The above HIV science is 40 years old and very well established so there is no detail that you can add that will make your encounter a risk for HIV. No one got HIV from the situation you encountered in 40 years and likely no one will in the next 40 of your life, and doctors have calculated that there is less likelihood of HIV transmission happening than of you getting hit by a meteor as you read this.