I've been working with Niels Basjes on a standardized developer build environment that can run `./gradlew check` [1]. We've run into issues because several Java unit tests (class *Test, run with :test) are not hermetic. They fail unless the environment they're running in has access to the internet, and is authenticated to GCP with access to certain resources. Of course the former isn't typically a blocker, but the latter certainly can be.
Personally I think these tests should be classified as integration tests (renamed to *IT, and run with the :integrationTest task), but I realized I don't know if we have a formal definition for what should be a unit test vs an integration test. Should we (do we) require unit tests to be hermetic? Brian [1] https://github.com/apache/beam/pull/13308