The details can be found in the comments I added to the test, but the gist of it is that capturing output injects rescheduling a green task on failure, which wasn't desired for the test in question. cc #12340