Commit d7c68a2
committed
test(telemetry): de-flake FeatureFlagCache placeholder test (network seam)
The "fetchFeatureFlag should return false as placeholder implementation"
test called the real fetchFeatureFlag, which makes an HTTP call via
fetchWithRetry (10s timeout) to a bogus host. Under mocha's 2s default it
only passed when the DNS failure happened to resolve quickly — flaky
across runners and Node versions (it timed out on Node 14/16/18 in CI,
fail-fast-canceling the rest of the matrix; Node 20 passed).
Stub the fetchWithRetry network seam so the test deterministically
exercises the behavior under test (fetchFeatureFlag resolves to false)
with no real network call. No production code change.
Co-authored-by: Isaac
Signed-off-by: Madhavendra Rathore <madhavendra.rathore@databricks.com>1 parent 95d41f1 commit d7c68a2
1 file changed
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
260 | 268 | | |
261 | 269 | | |
262 | 270 | | |
| 271 | + | |
| 272 | + | |
263 | 273 | | |
264 | 274 | | |
265 | 275 | | |
| |||
0 commit comments