This repository is for active development of the Azure SDK for Java. For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/java/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-java.
MIT License
2.3k
stars
1.96k
forks
source link
[Bug] Test Proxy overrides values when sending multiple custom matcher requests. #35967
interceptorManager.addMatcher(new CustomMatcher().setHeaderKeysOnlyMatch("something"), new CustomMatcher().setComparingBodies(false));
This sends two custom matcher, where the latter will override header values for the previous one.
Expected:
Group all custom matcher requests to one and then send the composite request to test proxy.
Workaround:
Instead of using the CustomMatcher twice, can use a custom matcher like:
new CustomMatcher().setHeaderKeysOnlyMatch("something").setComparingBodies(false)
or
new CustomMatcher().setHeaderKeysOnlyMatch("something"), new BodilessMatcher()
### Tasks
- [ ] Add a test case for annotation + custom matcher
Repro:
interceptorManager.addMatcher(new CustomMatcher().setHeaderKeysOnlyMatch("something"), new CustomMatcher().setComparingBodies(false));
This sends two custom matcher, where the latter will override header values for the previous one.
Expected: Group all custom matcher requests to one and then send the composite request to test proxy.
Workaround: Instead of using the CustomMatcher twice, can use a custom matcher like:
new CustomMatcher().setHeaderKeysOnlyMatch("something").setComparingBodies(false)
or
new CustomMatcher().setHeaderKeysOnlyMatch("something"), new BodilessMatcher()