Add --wait to the test command inside the bundle archetype's metadata.xml.