Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RabbitMQ - GH-43 - Support Fix For Routing Key #801

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -1,5 +1,5 @@
/*
* Copyright 2014-2016 the original author or authors.
* Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,6 +16,8 @@

package org.springframework.cloud.stream.binder;

import static org.assertj.core.api.Assertions.assertThat;

import java.util.Arrays;
import java.util.List;
import java.util.UUID;
Expand All @@ -35,8 +37,6 @@
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.support.GenericMessage;

import static org.assertj.core.api.Assertions.assertThat;

/**
* Tests for binders that support partitioning.
*
Expand Down Expand Up @@ -194,8 +194,7 @@ public void testPartitionedModuleSpEL() throws Exception {
Binding<MessageChannel> outputBinding = binder.bindProducer("part.0", output, producerProperties);
try {
Object endpoint = extractEndpoint(outputBinding);
assertThat(getEndpointRouting(endpoint))
.contains(getExpectedRoutingBaseDestination("part.0", "test") + "-' + headers['partition']");
checkRkExpressionForPartitionedModuleSpEL(endpoint);
}
catch (UnsupportedOperationException ignored) {
}
Expand Down Expand Up @@ -249,6 +248,11 @@ public boolean matches(Message<?> value) {
outputBinding.unbind();
}

protected void checkRkExpressionForPartitionedModuleSpEL(Object endpoint) {
assertThat(getEndpointRouting(endpoint))
.contains(getExpectedRoutingBaseDestination("part.0", "test") + "-' + headers['partition']");
}

@Test
public void testPartitionedModuleJava() throws Exception {
B binder = getBinder();
Expand Down