Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Flaky Unit Test #1248

Open
cicoyle opened this issue Mar 10, 2025 · 2 comments
Open

Fix Flaky Unit Test #1248

cicoyle opened this issue Mar 10, 2025 · 2 comments
Labels
kind/bug Something isn't working

Comments

@cicoyle
Copy link
Contributor

cicoyle commented Mar 10, 2025

Fix flaky test showing in CI:

https://github.com/dapr/java-sdk/actions/runs/13773015167/job/38515789368?pr=1246

Error:  Errors: 
Error:    ConsumerAppTests.testMessageConsumer » IllegalState Failed to load ApplicationContext for [WebMergedContextConfiguration@60a781 testClass = io.dapr.springboot.examples.consumer.ConsumerAppTests, locations = [], classes = [io.dapr.springboot.examples.consumer.TestConsumerApplication, io.dapr.springboot.examples.consumer.DaprTestContainersConfig, io.dapr.springboot.examples.consumer.ConsumerAppTestConfiguration, io.dapr.springboot.DaprAutoConfiguration], contextInitializerClasses = [], activeProfiles = [], propertySourceDescriptors = [], propertySourceProperties = ["org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true"], contextCustomizers = [org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@a619c2, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@6331250e, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@a0a9fa5, org.springframework.boot.test.web.reactor.netty.DisableReactorResourceFactoryGlobalResourcesContextCustomizerFactory$DisableReactorResourceFactoryGlobalResourcesContextCustomizerCustomizer@6a84bc2a, org.springframework.boot.test.autoconfigure.OnFailureConditionReportContextCustomizerFactory$OnFailureConditionReportContextCustomizer@27068a50, org.springframework.boot.test.autoconfigure.actuate.observability.ObservabilityContextCustomizerFactory$DisableObservabilityContextCustomizer@1f, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizer@5d39f2d8, org.springframework.test.context.support.DynamicPropertiesContextCustomizer@0, org.springframework.boot.testcontainers.service.connection.ServiceConnectionContextCustomizer@0, org.springframework.boot.test.context.SpringBootTestAnnotation@eed3c14], resourceBasePath = "src/main/webapp", contextLoader = org.springframework.boot.test.context.SpringBootContextLoader, parent = null]
[INFO] 
Error:  Tests run: 1, Failures: 0, Errors: 1, Skipped: 0

for reference:
ciOutput.txt

@cicoyle cicoyle added the kind/bug Something isn't working label Mar 10, 2025
@cicoyle
Copy link
Contributor Author

cicoyle commented Mar 12, 2025

Hey @salaboy, would you by chance know the root cause and be able to investigate & fix the flakiness with this test app? It was introduced in this PR I believe

@salaboy
Copy link
Contributor

salaboy commented Mar 12, 2025

This one doesn't usually fail.. I am more worried about the other flaky ones

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants