Skip to content
This repository was archived by the owner on Jul 7, 2026. It is now read-only.
This repository was archived by the owner on Jul 7, 2026. It is now read-only.

Curious about pruning of context-path in contract and in consumer-side test #2306

Description

@davidmichaelkarr

My POC is basically working, both for provider-side and consumer-side tests. One thing that I found curious was what is done with the endpoint url with respect to the context-path.

In the contract definition, the url value must not include the context-path apparently. Taken by itself, this is not that surprising, but the apparent effect on the consumer-side test is more surprising.

The resource controller has an autowired url for the endpoint it has to reach, which will include the port number. In my consumer-side test, I have to munge that with reflection, changing the port to the stub runner port. This is not surprising. What is surprising is that I also have to change that url to remove the context-path. The context-path in our services is always "/msapi", so now instead of the url being something like http://localhost:8080/msapi/servicename/endpoint, it becomes http://localhost:<stubrunnerport>/servicename/endpoint. This works, but it sure seems odd.

Can you explain the background of this?

Activity

  1. marcingrzejszczak commented on Sep 29, 2025

    @marcingrzejszczak
    Contributor

    We describe how to work with context paths here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions