<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>linkjob-notes</title>
    <link>https://paper.wf/linkjob-notes/</link>
    <description></description>
    <pubDate>Wed, 18 Nov 2026 06:37:35 +0000</pubDate>
    <item>
      <title>Taming Flaky Tests: A Practical Triage Guide</title>
      <link>https://paper.wf/linkjob-notes/taming-flaky-tests-a-practical-triage-guide</link>
      <description>&lt;![CDATA[A flaky test is one that passes and fails on the same code. Left alone, flaky tests teach a team to ignore red builds, and that is far more expensive than the test itself.&#xA;&#xA;Step 1: Prove it is flaky&#xA;Rerun the failing test in isolation 50 to 100 times (pytest --count=100, go test -count=100, or a simple shell loop). If it never fails alone but fails in the full suite, the problem is shared state, not the test logic.&#xA;&#xA;Step 2: Classify the cause&#xA;Most flakiness falls into a few buckets:&#xA;&#xA;Time: tests that depend on now(), sleeps, or timeouts tuned on a fast laptop. Inject a clock instead of sleeping.&#xA;Ordering: tests that pass only when another test runs first and leaves data behind. Randomize test order to expose them.&#xA;Concurrency: races between a background worker and the assertion. Wait on a condition, never on a fixed sleep.&#xA;External services: real network calls, DNS, or third-party sandboxes. Replace them with fakes at the boundary.&#xA;Unordered collections: asserting on the order of a set, map, or SQL query without ORDER BY.&#xA;&#xA;Step 3: Quarantine, do not delete&#xA;Move the test to a quarantine job that still runs but does not block merges, and open a ticket with an owner and a deadline. Quarantine without an owner is just deletion with extra steps.&#xA;&#xA;Step 4: Measure&#xA;Track the flake rate per test (failures that pass on retry divided by total runs). A weekly list of the top five offenders keeps the problem visible and small.&#xA;&#xA;Interview angle&#xA;&#34;How would you deal with a flaky CI pipeline?&#34; is a common senior-engineer question. A strong answer walks through reproduce, classify, quarantine with ownership, and measure. If you want to rehearse answers like this out loud before a real interview, Linkjob AI is an interview practice assistant I work on (disclosure: I&#39;m on the team).]]&gt;</description>
      <content:encoded><![CDATA[<p>A flaky test is one that passes and fails on the same code. Left alone, flaky tests teach a team to ignore red builds, and that is far more expensive than the test itself.</p>

<h2 id="step-1-prove-it-is-flaky">Step 1: Prove it is flaky</h2>

<p>Rerun the failing test in isolation 50 to 100 times (pytest —count=100, go test -count=100, or a simple shell loop). If it never fails alone but fails in the full suite, the problem is shared state, not the test logic.</p>

<h2 id="step-2-classify-the-cause">Step 2: Classify the cause</h2>

<p>Most flakiness falls into a few buckets:</p>
<ul><li><strong>Time</strong>: tests that depend on now(), sleeps, or timeouts tuned on a fast laptop. Inject a clock instead of sleeping.</li>
<li><strong>Ordering</strong>: tests that pass only when another test runs first and leaves data behind. Randomize test order to expose them.</li>
<li><strong>Concurrency</strong>: races between a background worker and the assertion. Wait on a condition, never on a fixed sleep.</li>
<li><strong>External services</strong>: real network calls, DNS, or third-party sandboxes. Replace them with fakes at the boundary.</li>
<li><strong>Unordered collections</strong>: asserting on the order of a set, map, or SQL query without ORDER BY.</li></ul>

<h2 id="step-3-quarantine-do-not-delete">Step 3: Quarantine, do not delete</h2>

<p>Move the test to a quarantine job that still runs but does not block merges, and open a ticket with an owner and a deadline. Quarantine without an owner is just deletion with extra steps.</p>

<h2 id="step-4-measure">Step 4: Measure</h2>

<p>Track the flake rate per test (failures that pass on retry divided by total runs). A weekly list of the top five offenders keeps the problem visible and small.</p>

<h2 id="interview-angle">Interview angle</h2>

<p>“How would you deal with a flaky CI pipeline?” is a common senior-engineer question. A strong answer walks through reproduce, classify, quarantine with ownership, and measure. If you want to rehearse answers like this out loud before a real interview, <a href="https://www.linkjob.ai/" rel="nofollow">Linkjob AI</a> is an interview practice assistant I work on (disclosure: I&#39;m on the team).</p>
]]></content:encoded>
      <guid>https://paper.wf/linkjob-notes/taming-flaky-tests-a-practical-triage-guide</guid>
      <pubDate>Fri, 13 Nov 2026 13:05:24 +0000</pubDate>
    </item>
  </channel>
</rss>