Testing using queue to write to db