Add retry logic for Publishtests

@Praburaj 

adding retry logic as discussed