Skip to content

Unstable Testcontainers tests #923

@tzolov

Description

@tzolov

If you run the spring-ai-spring-boot-testcontainers from the CLI , e.g.

./mvnw clean install -pl spring-ai-spring-boot-testcontainers -Pintegration-tests

the OpenSearchContainerConnectionDetailsFactoryTest consistently fails with :

        at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:152)
        ... 17 more
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.opensearch.client.opensearch.OpenSearchClient]: Factory method 'openSearchClient' threw exception with message: Cannot invoke "java.util.List.stream()" because the return value of "org.springframework.ai.autoconfigure.vectorstore.opensearch.OpenSearchVectorStoreProperties.getUris()" is null
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:177)
        at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:644)
        ... 41 more
Caused by: java.lang.NullPointerException: Cannot invoke "java.util.List.stream()" because the return value of "org.springframework.ai.autoconfigure.vectorstore.opensearch.OpenSearchVectorStoreProperties.getUris()" is null
        at org.springframework.ai.autoconfigure.vectorstore.opensearch.OpenSearchVectorStoreAutoConfiguration$OpenSearchConfiguration.openSearchClient(OpenSearchVectorStoreAutoConfiguration.java:75)
        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:140)
        ... 42 more

Also the OllamaContainerConnectionDetailsFactoryTest is unstable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions