greenwich commented on PR #9546:
URL: https://github.com/apache/ozone/pull/9546#issuecomment-3709421193

   > @greenwich your added test cases looks great, but we can have test for 
below case as well in `TestS3GrpcOmTransport.java`:
   > 
   > * The current tests validate per-request isolation for concurrent threads, 
but don't verify that a SINGLE thread making MULTIPLE sequential requests gets 
a fresh counter for each request.
   > 
   > **Why we need this?** In production, S3G handler threads serve many 
sequential requests. Need to verify **requestFailoverCount** doesn't leak 
between them.
   > 
   > Test Scenario:
   > 
   > 1. **Configure low max attempts** (e.g., 2) to quickly exhaust budget
   > 2. **First request:** Configure mock to keep failing (`completeFailover = 
false`)
   >    
   >    * Should throw exception after exhausting all retries
   >    * Proves counter reached the limit
   > 3. **Second request:** Configure mock to fail once then succeed
   >    
   >    * Should succeed despite first request exhausting its budget
   >    * Proves counter reset to 0
   > 4. **Assert:** Second request completes successfully with OK status
   > 
   > **Without this test:** We rely on inference that local variables reset, 
but don't explicitly verify the fix works for sequential requests.
   
   I think  `testGrpcFailoverProxyCalculatesFailoverCountPerRequest` tests the 
two-consequent-request scenario. It approaches it a bit differently, but still, 
it implicitly checks that the counter was reset. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to