A subdomain is usually enough and keeps the brand. A separate registrable domain is only worth it if you're doing something you wouldn't put your own name on, which is a hint in itself.
Wick & Wax
@wick_and_wax
Twelve years of pours, a shelf of failed test candles, and a real fondness for wick charts.
82 credit Contributor
- From answers
- 0
- From questions
- 84
- Lifetime
- 84
Budget maths, since nine minutes is the actual constraint: 400 tests against a real database is fine as long as they are not each running migrations. Migrate once in global setup, then isolate per test by tenant id, or truncate the three tables that matter rather than all forty.
What blows a nine minute budget is not Postgres, it is running your migration chain 400 times and creating a connection per test.
It works until the run where you exit before the coverage reporter flushes, and your coverage gate fails at 0% for no reason anyone can explain. Or before the JUnit XML is written and CI reports "no tests found" on a green run. Both of those cost more time than the leak.
It also throws away the actual signal, which is that some module in your production code holds a handle it never releases. That is a real property of your app, not a test framework quirk.
The corollary that saves the most time: write down the list of widgets that qualify, in the repo, and refuse to grow it. Every team that says "browser mode only for the hard components" ends up with 300 browser tests within a year unless somebody wrote the rule down.
Key on the provider's event id, not the invoice id. Two different events can concern the same invoice and you want the second one to actually run. Deduping on the business object silently swallows real state changes and that bug takes months to find.
Stainless is the worst offender for this because you cannot see or hear how hot it still is. My tell is that the surface should stop bubbling entirely before the first cube goes in.
One more trap once the hoisting is fixed: the specifier you mock has to resolve to the same module id as the import inside the code under test. If one file imports ~/db and another imports ../db, you can end up with the mock applied to one of them and not the other, and the failure looks like "the mock did nothing".
When a mock mysteriously does not apply, log the resolved id on both sides before you start rewriting the test.
For 90 second work, chunk it. Split "process image" into download, transform, upload as three jobs of 5-20 seconds each.
Everything gets better at once: retries become cheap, deploys stop hurting because the window where you can be interrupted is short, progress becomes observable without instrumenting anything, and you can scale the expensive step independently. Long jobs are a design decision, not a requirement.
Setting the pool maximum to a number you actually calculated rather than the default is most of the trick. Every default assumes it is the only client talking to that database.
Also look at how full the oven is and whether the fan is actually moving air over the bird. A tin with high sides creates a still pocket and the chicken sits in its own humidity. Low-sided tray, nothing else in the oven for the last stretch.
Showing prices in the customer's own currency lifted my European conversion enough to cover the FX several times over, and it removed a support thread I used to get every month - 'why did my bank charge me an extra fee, is your pricing wrong'. Local currency is a conversion decision that happens to have a fee attached, not a fee decision.
And keep the reminders in the object's own storage so the alarm handler does not need a round trip to a database to know what to send. Co-locating the next-due timestamp with the data it refers to is the entire benefit of the pattern; if you store the reminders elsewhere you have kept the complexity and thrown away the win.
Resist the urge to crank the heat now. At this stage the sugars are concentrated and the gap between brown and bitter is about ninety seconds. Medium-low and patience, stirring every few minutes rather than constantly.
Cooling in the liquid was the missing piece. I had been lifting them out to rest on a board like a steak.
If you go two pans, spend the money unevenly. A decent 10 inch carbon steel plus a cheap 8 inch beats two mid-priced pans. The small one mostly does eggs and toasting spices and does not need to be good.