<p></p>
<blockquote>
<p>If anyone has any suggestions on the first topic, I'm all ears</p>
</blockquote>
<p>OK, I think I know how to make these show situations up in the tests. First, we need to enable the database_selector middleware in the test environment (and we might as well do so for development, too).</p>
<p>However, the <code>controller</code> tests bypass the middleware entirely (partly why controller tests are deprecated - in many ways they don't really reflect an actual response). So only system tests are effective at picking up this problem, since they run the middleware.</p>
<p>Converting <code>controller</code> tests to <code>system</code> tests would be welcome, but it's a giant project! I'm not sure what to do in the meantime. Given the advantages of having reads-from-replicas enabled, it's worth taking the risk and fixing bugs if and when they come up?</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2563#issuecomment-611019746">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLI2OY3MX62YBX76FITRLSITLANCNFSM4LOVDDGQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAK2OLIXUFNK5UQCRHQIXITRLSITLA5CNFSM4LOVDDG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOERVWXYQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/2563#issuecomment-611019746",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/2563#issuecomment-611019746",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>