net/http: dubious code in TestServeMuxHandlerRedirects #18068
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Testing
An issue that has been verified to require only test changes, not just a test failure.
Milestone
The test
TestServeMuxHandlerRedirects
innet/http/serve_test.go
looks dubious. Thefor tries > 0
loop will execute exactly once –tries
starts at 1, gets decremented once at the bottom of the loop, and there is no path that would skip the decrement and execute the loop again. Similarly, the checkif tries < 0
can never be true –tries
will either be its initial value of 1, or the once-decremented value 0./cc @bradfitz
The text was updated successfully, but these errors were encountered: