Closed eserte closed 6 years ago
1.302104 merged a PR that combines multiple diags into a single diag. I was on the fence merging it because I was afraid this could happen if anyone had been testing Test::Builder things with Test2::API::intercept, though my downstream testing did not find any at the time.
This combination is rare enough that I would prefer to have projects like this one fix it on their end. If that is simply not viable please let me know and we can work out another solution.
I have been using Test2::API::Intercept to test Test::Builder things. Most of them have been migrated to Test2::API by now. I am going to migrate this to Test2::API now anyway. If this pops up in other projects I am happy to fix them there. I have noticed when migrating Test::Builder to Test2::API with intercept tests I get a different number of Diags, so this would be more consistent IMO.
yeah. Test2::API::Intercept "works" for Test::Builder, but it is not ideal as Test::Builder is a compatibility/abstraction layer, and what events it generates when may change in order to preserve legacy behavior (read-as: output, and non-Test2 interactions) as the rest of Test2 moves forward.
Most of the time I've written intercept tests for Test::Builder code just prior to migrating to Test2::API so that I can have confidence in the migration. (the one caveat had been extra Diags from Test::Builder version as mentioned). For the amount of time the the code was mismatched this has been acceptable. I think this is an exception where I wrote some intercept tests without immediately switching to Test2::API. I am also happy for this to be an excuse to switch to Test::API anywhere else that this pops up.
My smokers started to report failures:
Statistical analysis suggests that the problem happens with the latest Test::More (@exodist: FYI):