JoegenUSTC commented on PR #11355:
URL: https://github.com/apache/gravitino/pull/11355#issuecomment-4601343528

   > @JoegenUSTC Can you add some UTs and ITs to cover and verify your changes 
here?
   
   Thanks for the suggestion!
   
   I've added tests in a follow-up commit (`9ec3efcf`):
   
   **Unit tests** (`TestHiveClientFactoryClassLoader`, no external 
dependencies, all 4 pass locally):
   - Two tests for Bug 1: one proves `HiveClientFactory.class.getClassLoader()` 
is stable across threads (the rationale for the fix), one contrast test shows 
TCCL is thread-dependent and therefore an unreliable `baseLoader`.
   - Two tests for Bug 2: one verifies that `createHiveClientImpl()` calls 
`loadClass(HiveVersion)` on the isolated ClassLoader before `getConstructor()` 
(so no `NoSuchMethodException`), one contrast test reproduces the original 
failure by passing a mismatched CL's `HiveVersion` to `getConstructor()` and 
asserting it throws `NoSuchMethodException`.
   
   **Integration test** (`TestHive2HMSWithKerberosNoImpersonation`, 
`@Tag("gravitino-docker-test")`):
   - Extends the existing `TestHive2HMSWithKerberos` but sets 
`authentication.impersonation-enable=false`. This exercises exactly the 
non-impersonation Kerberos path fixed by Bug 3 (the missing `realUgi.doAs()`). 
The existing test only covered `impersonation=true`.
   - Requires a live KDC (Docker), so it runs under the `gravitino-docker-test` 
tag only.


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