Fixed a bug that caused the test to hang up: The buffer has to be
flushed.