Skip to content

Stubrunner pulls in Eureka and Config clients of client under test causing test to fail #141

@mattreyuk

Description

@mattreyuk

I have a client I'm testing with Eureka and Spring Cloud Config clients included. When I run a client side test with my stub jar, the created stubrunner follows the default behavior of my client and attempts to connect to Eureka and Config Server. As fail-fast is also set, when it can't connect to Eureka or the default localhost:8888 config server, it terminates and fails the test.

My client under test runs with a standalone profile that turns off Eureka and Config clients.

It appears that the stubrunner container starts with a profile of development as when I setup configuration in bootstrap.yml for development to match my standalone profile, the stubrunner starts without issue, serves the stub data and the test completes successfully.

This development profile workaround is likely to cause problems for anyone who already has a profile of that name.

I have a project to demo this at https://github.com/mattreyuk/clientTest

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions