Skip to content

Commit db49875

Browse files
author
Emile Joubert
committed
CcRoute type test
1 parent e6f6c69 commit db49875

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/src/com/rabbitmq/client/test/functional/CcRoutes.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
package com.rabbitmq.client.test.functional;
1818

19+
import com.rabbitmq.client.AMQP;
1920
import com.rabbitmq.client.AMQP.BasicProperties;
2021
import com.rabbitmq.client.GetResponse;
2122
import com.rabbitmq.client.test.BrokerTestCase;
@@ -114,6 +115,18 @@ private void headerPublish(String ex, String to, List<String> cc, List<String> b
114115
channel.basicPublish(ex, to, props, new byte[0]);
115116
}
116117

118+
public void testNonArray() throws IOException {
119+
headers.put("CC", 0);
120+
props.setHeaders(headers);
121+
channel.basicPublish("", "queue1", props, new byte[0]);
122+
try {
123+
expect(new String[] {}, false);
124+
fail();
125+
} catch (IOException e) {
126+
checkShutdownSignal(AMQP.PRECONDITION_FAILED, e);
127+
}
128+
}
129+
117130
private void expect(String[] expectedQueues, boolean usedCc) throws IOException {
118131
GetResponse getResponse;
119132
List<String> expectedList = Arrays.asList(expectedQueues);

0 commit comments

Comments
 (0)