Add test for flushing queue in forked process