Skip to content

Improve documentation around testing setup #285

@cdprete

Description

@cdprete

Hello.

This is somehow a continuation of #278.

The documentation should, in my opinion, offer at least an example of configuration which doesn't require @SpringBootTest.

In my application, I've some LDAP configuration which gets usually loaded and @SpringBootTest starts a full context, therefore including such chunk of LDAP stuff, even if they're not needed.
@DataLdapTest would resolve the issue with the missing LDAP resources, but it doesn't work because then there are 2 bootstrap contexts defined (the one coming from @SpringBootTest and the one coming from @DataLdapTest).

@dsyer The only I found to make this work was to use @SpringJUnit and to set explicitly the spring.grpc.test.inprocess.enabled property to true with a @TestPropertySource since, for some unknown reasons to me, @AutoConfigureInProcessTransport was then getting ignored. I don't know if it's maybe a bug then.

  • Spring Boot version: 3.5.7
  • Spring gRPC version: 0.11.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions