Tests: wait for bulk before closing the test

Closes #72.
Closes #73.

(cherry picked from commit 1601688)