database test query finished