bryancall opened a new pull request, #12727:
URL: https://github.com/apache/trafficserver/pull/12727

   This PR adds a test that demonstrates issue #12611: TSHttpTxnServerAddrSet() 
retry fails because the OS_DNS hook is not called again when connection fails.
   
   ## Test Description
   
   The test plugin (`test_TSHttpTxnServerAddrSet_retry`):
   - Hooks into `TS_HTTP_OS_DNS_HOOK`
   - On first call: Sets a non-routable address (192.0.2.1:80) that will fail 
to connect
   - On subsequent calls: Sets localhost (127.0.0.1:8080) that should work
   - Tracks and logs how many times the OS_DNS hook was called
   
   ## Expected Results
   
   **On master (bug exists):**
   - OS_DNS hook is called only ONCE
   - Connection fails with the bad address
   - Plugin never gets a chance to provide an alternative address
   - Test logs: `BUG CONFIRMED: OS_DNS hook was only called ONCE`
   
   **After fix is applied:**
   - OS_DNS hook should be called multiple times on retry
   - Plugin can provide a different address
   - Test logs: `SUCCESS: OS_DNS hook was called X times`
   
   ## Test Output on Master (Confirms Bug)
   
   ```
   [TSHttpTxnServerAddrSet_retry] OS_DNS hook called, count=1
   [TSHttpTxnServerAddrSet_retry] Attempt 1: Setting BAD address 192.0.2.1:80 
(will fail)
   [TSHttpTxnServerAddrSet_retry] Transaction closing. OS_DNS was called 1 
time(s)
   [TSHttpTxnServerAddrSet_retry] *** BUG CONFIRMED: OS_DNS hook was only 
called ONCE. ***
   ```
   
   This test is a precursor to the fix PR for #12611.


-- 
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]

Reply via email to