Fix race condition in Hive tests