Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

passed the junit test

  • Loading branch information...
commit 67c3c43cee107caca6283c3e0c44b41e2aa73d44 1 parent 61930f2
U-krishna-PC\krishna authored
View
2  src/main/resources/log4j.xml
@@ -12,7 +12,7 @@
<!-- Loggers -->
- <logger name="com.goSmarter.amqp.service">
+ <logger name="com.goSmarter.amqp">
<level value="debug" />
</logger>
View
17 src/test/java/com/goSmarter/amqp/PublisherSubscriberTest.java
@@ -1,14 +1,12 @@
package com.goSmarter.amqp;
-import static org.junit.Assert.*;
-import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertEquals;
import java.io.IOException;
import java.io.InputStream;
import java.io.StringWriter;
import java.io.Writer;
-import org.apache.log4j.Logger;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
@@ -26,12 +24,14 @@
"classpath:gemfire-config.xml" })
public class PublisherSubscriberTest {
- private static Logger logger = Logger.getLogger(PublisherSubscriberTest.class);
-
@Autowired
@Qualifier("p2p-pollable-channel")
MessageChannel channel;
-
+
+ @Autowired
+ @Qualifier("checkout-channel3")
+ PollableChannel channel1;
+
@Test
public void testIntegration() {
try {
@@ -41,7 +41,10 @@ public void testIntegration() {
Message<String> message = MessageBuilder.withPayload(request)
.build();
- channel.send(message);
+ channel.send(message);
+
+ String outMessage = channel1.receive(1000).getPayload().toString();
+ assertEquals(outMessage, request);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
View
9 src/test/resources/spring-integration-test-context.xml
@@ -7,10 +7,17 @@
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
-
<int:poller default="true" fixed-rate="1000" />
<int:channel id="p2p-pollable-channel" />
<int:publish-subscribe-channel id="pub-sub-channel" />
+
+ <int:channel id="checkout-channel3" >
+ <int:queue />
+ </int:channel>
+
+ <int:claim-check-out message-store="simpleMessageStore"
+ input-channel="pub-sub-channel" output-channel="checkout-channel3"
+ remove-message="false" />
</beans>
Please sign in to comment.
Something went wrong with that request. Please try again.