helidon-io / helidon

Java libraries for writing microservices
https://helidon.io
Apache License 2.0
3.44k stars 561 forks source link

Test fails: TestInstancePrincipalsAuthenticationDetailsProvider #8870

Open al3xandru opened 2 weeks ago

al3xandru commented 2 weeks ago

Environment Details


Problem Description

The following test io.helidon.integrations.oci.sdk.cdi.TestInstancePrincipalsAuthenticationDetailsProvider.testThatInstancePrincipalsAuthenticationDetailsProviderAlwaysTakesManySecondsToRun fails while building from source.

Steps to reproduce

The build is run in a special environment that seems to result in an unexpected behavior for this test (i.e. getting a response back too fast).

tomas-langer commented 2 weeks ago

testThatInstancePrincipalsAuthenticationDetailsProviderAlwaysTakesManySecondsToRun()

This fails because the metadata endpoint IP address is available, and the test expects it is not. there are two possibilities:

In addition the library should be on classpath of the test (the exception that was received should never be received, even if running on OCI).

I think there should be an assumption that if the test runs on OCI, it should just be skipped (and the same in helidon-integrations-oci and in helidon-integrations-sdk-cdi module tests).