charucjoshi opened a new issue, #10956:
URL: https://github.com/apache/gravitino/issues/10956

   ### What would you like to be improved?
   
   The current location of `TestAwsGlueSchema.java` and `TestAwsGlueTable.java` 
causes them to run during standard unit test builds if a developer has ambient 
AWS credentials configured locally. 
   
   Because the files resides in `catalogs/catalog-glue/src/test/java/...`, it 
bypasses the Gradle `exclude("**/integration/test/**")` rule tied to the 
`skipITs` flag. If a contributor runs a standard `./gradlew 
catalogs:catalot-glue:test -PskipITs` while having `AWS_ACCESS_KEY_ID` set in 
their terminal profile, JUnit will automatically execute these live cloud 
integration tests. 
   
   This can lead to unintended resource creation in personal or organizational 
AWS accounts, trigger security alerts, or cause accidental API costs for local 
developers.
   
   ### How should we improve?
   
   To improve the local developer experience and ensure live AWS tests are only 
run when explicitly intended, we should resolve the boundary between the unit 
and integration tests. I propose two potential paths:
   
   - Move `TestAwsGlueSchema.java` and `TestAwsGlueTable.java`  into a 
`integration/test/...` directory. This properly classifies them as integration 
tests and perfectly aligns with the existing `skipITs` Gradle logic, ensuring 
the test is safely skipped by default for local builds.
   
   - Keep the test in the unit test directory, but decouple it from the real 
AWS network endpoint. We can refactor the test to use Mockito to mock the 
`GlueClient`.


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