|
13 | 13 |
|
14 | 14 | package org.springframework.xd.dirt.stream; |
15 | 15 |
|
| 16 | +import static org.hamcrest.Matchers.greaterThan; |
16 | 17 | import static org.hamcrest.Matchers.instanceOf; |
17 | 18 | import static org.junit.Assert.assertEquals; |
18 | 19 | import static org.junit.Assert.assertFalse; |
|
38 | 39 | import org.junit.After; |
39 | 40 | import org.junit.AfterClass; |
40 | 41 | import org.junit.ClassRule; |
41 | | -import org.junit.Ignore; |
42 | 42 | import org.junit.Test; |
43 | 43 | import org.junit.rules.ExternalResource; |
44 | 44 | import org.slf4j.Logger; |
|
61 | 61 | import org.springframework.xd.dirt.integration.bus.MessageBus; |
62 | 62 | import org.springframework.xd.dirt.integration.bus.XdHeaders; |
63 | 63 | import org.springframework.xd.dirt.integration.bus.local.LocalMessageBus; |
64 | | -import org.springframework.xd.dirt.server.singlenode.SingleNodeApplication; |
65 | 64 | import org.springframework.xd.dirt.server.TestApplicationBootstrap; |
| 65 | +import org.springframework.xd.dirt.server.singlenode.SingleNodeApplication; |
66 | 66 | import org.springframework.xd.dirt.test.SingleNodeIntegrationTestSupport; |
67 | 67 | import org.springframework.xd.dirt.test.sink.NamedChannelSink; |
68 | 68 | import org.springframework.xd.dirt.test.sink.SingleNodeNamedChannelSinkFactory; |
@@ -329,9 +329,12 @@ public final void testTopicChannel() throws InterruptedException { |
329 | 329 |
|
330 | 330 | final Message<Object> bar1Message = (Message<Object>) bar1sink.receive(10000); |
331 | 331 | assertNotNull(bar1Message); |
332 | | - Object history = bar1Message.getHeaders().get(XdHeaders.XD_HISTORY); |
333 | | - assertNotNull(history); |
334 | | - assertThat(history, instanceOf(List.class)); |
| 332 | + Object historyObject = bar1Message.getHeaders().get(XdHeaders.XD_HISTORY); |
| 333 | + assertNotNull(historyObject); |
| 334 | + assertThat(historyObject, instanceOf(List.class)); |
| 335 | + List<Map<String, Object>> history = (List<Map<String, Object>>) historyObject; |
| 336 | + assertThat(history.size(), greaterThan(0)); |
| 337 | + assertNotNull(history.get(0).get("timestamp")); |
335 | 338 | final Object bar1 = bar1Message.getPayload(); |
336 | 339 | final Message<Object> bar2Message = (Message<Object>) bar2sink.receive(10000); |
337 | 340 | assertNotNull(bar2Message); |
|
0 commit comments