Fix race condition in storage test