CS FundamentalsHardProduct-company placement
A test in the CI suite passes and fails randomly on the same commit because it depends on timing. Developers have started re-running pipelines until they go green. What is the best practice?
- A. Delete the test permanently
- B. Increase all timeouts in the suite tenfold
- C. Quarantine the flaky test from the merge gate, track it as a defect and fix its root cause (e.g. replace sleeps with explicit waits or fake clocks)
- D. Ignore it, since most runs pass
Correct answer: C. Quarantine the flaky test from the merge gate, track it as a defect and fix its root cause (e.g. replace sleeps with explicit waits or fake clocks)
Flaky tests teach people to ignore red builds, which defeats CI. Isolating them keeps the gate trustworthy while the cause (timing, shared state, order dependence) is fixed.
Practise more Software Engineering, Git and Cloud Basics questionsSoftware Engineering, Git and Cloud Basics: notes and key points
More Software Engineering, Git and Cloud Basics questions
- A call hierarchy has 6 modules: M1 calls M2 and M3; M2 calls M4 and M5; M3 calls M6. Using the usual counts (top-down needs a stub for…
- A developer fixes a login bug. The tester first checks that the reported bug is really gone, then re-runs a set of existing login and…
- Match each performance test with its purpose. P: load test. Q: stress test. R: soak (endurance) test. S: spike test. 1. Run at normal load…
- In a closed-loop load test, 300 virtual users each wait a think time of 5 seconds between requests, and the measured throughput is 40…
- 20 response times (ms) are: 95, 97, 98, 99, 100, 101, 102, 103, 105, 108, 110, 112, 115, 120, 125, 130, 140, 300, 450, 900. Using the…
- A tester re-checks a defect marked 'Fixed' and finds it still occurs. To which state does the defect normally move in a standard defect…