{"action":"opened","issue":{"url":"https://api.github.com/repos/spring-cloud/spring-cloud-contract/issues/694","repository_url":"https://api.github.com/repos/spring-cloud/spring-cloud-contract","labels_url":"https://api.github.com/repos/spring-cloud/spring-cloud-contract/issues/694/labels{/name}","comments_url":"https://api.github.com/repos/spring-cloud/spring-cloud-contract/issues/694/comments","events_url":"https://api.github.com/repos/spring-cloud/spring-cloud-contract/issues/694/events","html_url":"https://github.com/spring-cloud/spring-cloud-contract/issues/694","id":342648531,"node_id":"MDU6SXNzdWUzNDI2NDg1MzE=","number":694,"title":"Producer tests fail if multiple channels have the same destination","user":{"login":"kaidowei","id":1669945,"node_id":"MDQ6VXNlcjE2Njk5NDU=","avatar_url":"https://avatars0.githubusercontent.com/u/1669945?v=4","gravatar_id":"","url":"https://api.github.com/users/kaidowei","html_url":"https://github.com/kaidowei","followers_url":"https://api.github.com/users/kaidowei/followers","following_url":"https://api.github.com/users/kaidowei/following{/other_user}","gists_url":"https://api.github.com/users/kaidowei/gists{/gist_id}","starred_url":"https://api.github.com/users/kaidowei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaidowei/subscriptions","organizations_url":"https://api.github.com/users/kaidowei/orgs","repos_url":"https://api.github.com/users/kaidowei/repos","events_url":"https://api.github.com/users/kaidowei/events{/privacy}","received_events_url":"https://api.github.com/users/kaidowei/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-19T09:24:51Z","updated_at":"2018-07-19T09:24:51Z","closed_at":null,"author_association":"NONE","body":"Bug report:\r\n\r\nSpring cloud contract producer tests fail for messages, if the destionation mentioned in `sentFrom(...)` is also used as an input channel. \r\nThis happens because the [StreamStubMessages.java#L87](https://github.com/spring-cloud/spring-cloud-contract/blob/63a1981f5431586f6044b61e27b519d6d1c0e7b6/spring-cloud-contract-verifier/src/main/java/org/springframework/cloud/contract/verifier/messaging/stream/StreamStubMessages.java#L87) choses the first binding it finds and due to the unsorted nature of java maps, it might be the input channel instead of the output channel. I suggest to somehow identify if the binding is **in** or **out** and always choose the **out** channel from spring cloud.\r\n\r\nPlease see the [pull request](https://github.com/spring-cloud-samples/spring-cloud-contract-samples/pull/31) in the spring cloud samples repository."}}
{"actor":{"display_login":"kaidowei"}}