Add retry logic for Publishtests

@Praburaj 

adding retry logic as discussed
oh i thought it was both that's why we added the OR clause. Should I keep WebException only ?