sarutak opened a new pull request, #58041:
URL: https://github.com/apache/spark/pull/58041

   ### What changes were proposed in this pull request?
   Test-only cleanup for `AwsStsCredentialProvider` introduced in #57655.
   
   - Remove redundant `// Visible for testing only.` line comments (already 
documented in Javadoc)
   - Introduce `confWithRoleArn()` and `assertInitThrowsForConfig()` test 
helpers to eliminate repeated boilerplate across init-validation tests
   - Use `confWithRoleArn()` consistently in success-path tests as well for 
uniform config construction
   - Consolidate 6 `testSanitizeSessionName*` methods into a single 
table-driven test with diagnostic messages
   - Replace `(char) 0xNN` workarounds with direct Unicode literals (`"café"`, 
`"session世"`) for clarity
   
   ### Why are the changes needed?
   Reduces test code duplication (~80 net lines removed), making future 
maintenance less error-prone. When the init validation or config construction 
pattern changes, only the helper needs updating rather than many individual 
test methods.
   
   ### Does this PR introduce _any_ user-facing change?
   No.
   
   ### How was this patch tested?
   Confirmed `build/sbt -Pcredential-aws 'credential-aws/test'` passed.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   Kiro CLI / Claude
   


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