Skip to content

Commit 3f2b5c8

Browse files
authored
Fix hanging SDK_API_HttpParentProxySet regression tests (#12721)
Remove the check for parent_routing_enabled() in the SDK_API_HttpParentProxySet regression tests. This check has been broken since 2019 when commit 6d1535b removed the proxy.config.http.parent_proxy_routing_enable configuration variable as redundant. The ParentEnable field in ParentSelectionPolicy is no longer set by any code (defaults to 0) and is not checked anywhere except this test. The test was waiting indefinitely for parent_routing_enabled() to return true, which would never happen in a default configuration. The test uses TSHttpTxnParentProxySet() to dynamically set a parent proxy via the API, which works regardless of whether parent routing is configured in parent.config. The check was unnecessary and caused the test to hang at regression level 3 (-R 3). This allows the SDK_API_HttpParentProxySet_Success and _Fail tests to complete successfully.
1 parent cf9aead commit 3f2b5c8

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/api/InkAPITest.cc

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7366,13 +7366,10 @@ parent_proxy_handler(TSCont contp, TSEvent event, void *edata)
73667366
break;
73677367
}
73687368

7369-
if (!ptest->parent_routing_enabled()) {
7370-
rprintf(ptest->regtest, "waiting for configuration\n");
7371-
TSContScheduleOnPool(contp, 100, TS_THREAD_POOL_NET);
7372-
break;
7373-
}
7369+
// This test uses TSHttpTxnParentProxySet() to dynamically set the parent proxy via
7370+
// the API, which works regardless of parent.config configuration.
73747371

7375-
// Now that the configuration is applied, it is safe to create a request.
7372+
// Now it is safe to create a request.
73767373
// HTTP_REQUEST_FORMAT11 is a hostname with a no-cache response, so
73777374
// we will need to set the parent to the synserver to get a
73787375
// response.

0 commit comments

Comments
 (0)