QueryLog and QueryCache tests