GraalVmNativeKafkaSpringStarterSmokeTest.java 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Copyright The OpenTelemetry Authors
  3. * SPDX-License-Identifier: Apache-2.0
  4. */
  5. package io.opentelemetry.spring.smoketest;
  6. import org.junit.jupiter.api.condition.EnabledInNativeImage;
  7. import org.springframework.boot.test.context.SpringBootTest;
  8. /**
  9. * GraalVM native image doesn't support Testcontainers in our case, so the docker container is
  10. * started manually before running the tests.
  11. *
  12. * <p>In other cases, it does work, e.g. <a
  13. * href="https://info.michael-simons.eu/2023/10/25/run-your-integration-tests-against-testcontainers-with-graalvm-native-image/">here</a>,
  14. * it's not yet clear why it doesn't work in our case.
  15. *
  16. * <p>In CI, this is done in reusable-native-tests.yml. If you want to run the tests locally, you
  17. * need to start the container manually: see .github/workflows/reusable-native-tests.yml for the
  18. * command.
  19. */
  20. @SpringBootTest(
  21. classes = {
  22. OtelSpringStarterSmokeTestApplication.class,
  23. SpringSmokeOtelConfiguration.class,
  24. AbstractKafkaSpringStarterSmokeTest.KafkaConfig.class
  25. },
  26. webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
  27. @EnabledInNativeImage // see JvmMongodbSpringStarterSmokeTest for the JVM test
  28. @RequiresDockerComposeEnvVariable
  29. public class GraalVmNativeKafkaSpringStarterSmokeTest extends AbstractKafkaSpringStarterSmokeTest {}