I’m not ready.....

I had sex with this guy a few times. Well the last time we had sex we used a condom but the condom split. The next afternoon I took plan b......however I was ovulating during that time frame. I’ve heard stories that plan b doesn’t always work. How long before I can take a pregnancy test?