<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000">
                                        
                                        
                                            
                                        
                                        
                                        Hi Christoph,<div><br></div><div>I would only start collecting coverage for tests that run fine in the first place. And if I would collect coverage, I want to get reliable numbers -- if that's even possible when speaking of "coverage" at all. :-D ... Anyway, higher-level processes could largely interfere with the results without you knowing it. Results could change just by re-running coverage, which would be bad.</div><div><br></div><div>Maybe one could bump the "user interrupt watcher" from 60 to 81 while running those coverage tests? To make CMD+Dot work ...</div><div><br></div><div>Hmm... you can also not run coverage on tests that rely on other processes to finish unless those processes have a priority relative to the current one and not hard-coded via "Processor userBackgroundPriority" etc. Those are fixed.</div><div><br></div><div>Just my thoughts on this topic.</div><div><br></div><div>Best,</div><div>Marcel</div><div class="mb_sig"></div>
                                        
                                        <blockquote class="history_container" type="cite" style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px">
                        <p style="color: #AAAAAA; margin-top: 10px;">Am 09.04.2020 15:33:23 schrieb Thiede, Christoph <christoph.thiede@student.hpi.uni-potsdam.de>:</p><div style="font-family:Arial,Helvetica,sans-serif">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt;color: rgb(0, 0, 0);font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols">
<p>Hi all,</p>
<p><br>
</p>
<p>I have a question regarding to the implementation of TestRunner >> #<span>collectCoverageFor:. Why does it use #<span>valueUnpreemptively during running the coverage tests?</span></span></p>
<p><span><span><br>
</span></span></p>
<p><span><span></span></span></p>
<p>I found two major disadvantages of using #valueUnpreemptively in the TestRunner:</p>
<p><br>
</p>
<p>
</p><ol style="margin-bottom:0px; margin-top:0px">
<li>
<p><span style="font-size: 12pt">You cannot interrupt the system via cmd+dot if you lose your patience to wait for all tests to complete.</span><br>
</p>
</li><li>
<p><span style="font-size: 12pt">In addition, I found a quite interesting bug that makes your image unusable if you do the following:<br>
<br>
</span></p>
</li></ol>
<p>
</p><p>
</p><blockquote style="margin: 0 0 0 40px;border: none;padding: 0px;min-width: 500px">
<p><span><span></span></span></p>
<blockquote style="margin: 0px 0px 0px 40px;border: none;padding: 0px;min-width: 500px">
<div>TestCase subclass: #MyTestCase</div>
</blockquote>
<p>
</p><p><span><span></span></span></p>
<blockquote style="margin: 0px 0px 0px 40px;border: none;padding: 0px;min-width: 500px">
<div><span style="white-space:pre"></span>instanceVariableNames: ''</div>
</blockquote>
<p>
</p><p><span><span></span></span></p>
<blockquote style="margin: 0px 0px 0px 40px;border: none;padding: 0px;min-width: 500px">
<div><span style="white-space:pre"></span>classVariableNames: ''</div>
</blockquote>
<p>
</p><p><span><span></span></span></p>
<blockquote style="margin: 0px 0px 0px 40px;border: none;padding: 0px;min-width: 500px">
<div><span style="white-space:pre"></span>poolDictionaries: ''</div>
</blockquote>
<p>
</p><p><span><span></span></span></p>
<blockquote style="margin: 0px 0px 0px 40px;border: none;padding: 0px;min-width: 500px">
<div><span style="white-space:pre"></span>category: 'UserObjects'.</div>
</blockquote>
<p>
</p><p><span><span></span></span></p>
<blockquote style="margin: 0px 0px 0px 40px;border: none;padding: 0px;min-width: 500px">
<div>MyTestCase compile: 'testTimeout</div>
</blockquote>
<p>
</p><p><span><span></span></span></p>
<blockquote style="margin: 0px 0px 0px 40px;border: none;padding: 0px;min-width: 500px">
<div><span style="white-space:pre"></span>[] repeat'.</div>
</blockquote>
<p>
</p><p><span><span></span></span></p>
<blockquote style="margin: 0px 0px 0px 40px;border: none;padding: 0px;min-width: 500px">
<div><span style="font-size: 12pt">TestRunner openForSuite: MyTestCase suite.</span></div>
</blockquote>
<p>
</p><p><span><span></span></span></p>
<blockquote style="margin: 0px 0px 0px 40px;border: none;padding: 0px;min-width: 500px">
<div><span style="font-size: 12pt">"Now press 'Run coverage' abd choose any non-empty package."</span></div>
</blockquote>
<span style="font-size: 12pt">
<p><span style="font-size: 12pt"><br>
</span></p>
The coverage test will never end!</span><span><span><br>
</span></span>
<p>
</p></blockquote>
<p><span><span></span></span></p>
<blockquote style="margin: 0px 0px 0px 40px;border: none;padding: 0px;min-width: 500px">
<p>
</p><div></div>
<p>
</p><p>
</p><p>
</p><p>
</p><p>
</p><p>
</p><p>
</p><p>
</p><p>
</p><p>
</p><p>
</p><p>
</p><p>
</p><p>
</p><p>
</p></blockquote>
<div><br>
</div>
<div>#valueUnpreemptively's comment says that you should use it very carefully, what makes absolutely sense to me, and it has only two senders in the Trunk at all (the second one is ClassBuilder >> #update:to:).<br>
</div>
<p>
</p><p>Why should it be necessary to use it in the TestRunner? Because we replace CompiledMethods? That's nothing WrappedBreakpoint wouldn't do, too. I replaced #valueUnpreemptively in this method by a normal #value in my image and the world did not end - thanks
 to dynamic forwarding, I could even keep browsing the patched methods. However, I admit it would not be a good idea to recompile any method during the coverage tests are running. (We could also use some property like Class >> #beLocked to avoid this, hypothetically).</p>
<p><br>
</p>
<p>I am looking forward to your advice.</p>
<p><br>
</p>
<p>Best,</p>
<p>Christoph</p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt;color: rgb(0,0,0);font-family: Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<div name="divtagdefaultwrapper" style="font-family: Calibri,Arial,Helvetica,sans-serif;font-size: ;margin: 0">
<div>
<div class="_rp_T4" id="Item.MessagePartBody">
<div class="_rp_U4 ms-font-weight-regular ms-font-color-neutralDark rpHighlightAllClass rpHighlightBodyClass" id="Item.MessageUniqueBody" style="font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif,serif,EmojiFont">
<div dir="ltr">
<div id="divtagdefaultwrapper"><span style="font-family: Calibri,Helvetica,sans-serif,EmojiFont,Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols">
<div id="Signature">
<div style="margin:0px"><font style="font-family:Calibri,Arial,Helvetica,sans-serif,serif,EmojiFont"></font></div>
</div>
</span></div>
</div>
</div>
</div>
</div>
<div><span style="font-size: 10pt;color: #808080"></span></div>
</div>
</div>
</div>
</div>
</div></blockquote></div>