You have nothing to worry about here. Licking doesn't transmit anything, and having the head of the penis in your mouth for 2 seconds won't either.
Oral sex on a penis transmits things when bacteria gets into your throat. That won't happen in 2 seconds, and there is no way of that happening when you have only the head of the penis in your mouth for such a brief time.
Truly, you can stop being so anxious about it. You do not need to test for anything as you had no risk for anything.