fix(formatter): On concurrent execution, execute formatter at end of Scenario#645
Conversation
2985202 to
ec38975
Compare
|
one test is broken, |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #645 +/- ##
==========================================
- Coverage 83.21% 79.79% -3.42%
==========================================
Files 28 41 +13
Lines 3413 4044 +631
==========================================
+ Hits 2840 3227 +387
- Misses 458 697 +239
- Partials 115 120 +5 ☔ View full report in Codecov by Sentry. |
…io when running concurrently
7f26697 to
db14449
Compare
|
Thank you! |
|
if this is a new formatter please, can we please have fmt-output-test cases in line with the other formatters please . consistent test patterns help other commiters helps avoid entropy |
|
@Johnlon it isn't really a new formatter and instead is a wrapper of current formatters. All it does is delay the execution of the wrapped formatter until the end of the scenario, and this delayed execution is tested. In an additional PR, I could put time into testing that the output of a wrapped formatter is as we would expect, but given the wrapper only provides behavioural changes, testing the behaviour as I've done here and using the output tests already in place is enough. |
|
@tigh-latte Thanks so much for adding this, I've been able to re-enable concurrency in my tests because of it! |
🤔 What's changed?
Add a new formatter type which only executes when
Flushis called. Use this formatter when running concurrently.Then while running concurrently, after the
suiteis copied for a scenario, we overwrite the copy'sFormatterto use this newOnFlushWrapformatter.At the end of
runPickle, if we canFlush, we do.⚡️ What's your motivation?
Fixes #643 , Scenario output is only printed at end of
runPicklefunc when running concurrently.🏷️ What kind of change is this?
♻️ Anything particular you want feedback on?
Any feedback on the general approach to solving this would be good.
📋 Checklist:
This text was originally generated from a template, then edited by hand. You can modify the template here.