Skip to content

Commit a8a5d51

Browse files
committed
Test field type matching.
1 parent 26f66f1 commit a8a5d51

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ public void testTopicRouting() throws Exception {
167167

168168
public void testHeadersRouting() throws Exception {
169169
Hashtable<String, Object> spec = new Hashtable<String, Object>();
170-
spec.put("h1", "foo");
170+
spec.put("h1", "12345");
171171
spec.put("h2", "bar");
172172
// See bug 20154: no current way to add a "Void"-typed spec pattern.
173173
spec.put("x-match", "all");
@@ -178,20 +178,24 @@ public void testHeadersRouting() throws Exception {
178178
AMQP.BasicProperties props = new AMQP.BasicProperties();
179179

180180
props.headers = new Hashtable<String, Object>();
181-
props.headers.put("h1", "foo");
181+
props.headers.put("h1", "12345");
182182
channel.basicPublish("amq.match", "", props, "1".getBytes());
183183

184+
props.headers = new Hashtable<String, Object>();
185+
props.headers.put("h1", 12345);
186+
channel.basicPublish("amq.match", "", props, "1b".getBytes());
187+
184188
props.headers = new Hashtable<String, Object>();
185189
props.headers.put("h2", "bar");
186190
channel.basicPublish("amq.match", "", props, "2".getBytes());
187191

188192
props.headers = new Hashtable<String, Object>();
189-
props.headers.put("h1", "foo");
193+
props.headers.put("h1", "12345");
190194
props.headers.put("h2", "bar");
191195
channel.basicPublish("amq.match", "", props, "3".getBytes());
192196

193197
props.headers = new Hashtable<String, Object>();
194-
props.headers.put("h1", "foo");
198+
props.headers.put("h1", "12345");
195199
props.headers.put("h2", "quux");
196200
channel.basicPublish("amq.match", "", props, "4".getBytes());
197201

0 commit comments

Comments
 (0)