Make sure we wait for a gearman server

Change-Id: I4cc5f5b6fb50a77116aeede4a450bd8281a5a5a9