polishing XMPP samples
This commit is contained in:
@@ -24,13 +24,7 @@
|
||||
password="${user.1.password}"
|
||||
host="${user.1.host}"
|
||||
service-name="${user.1.service}"/>
|
||||
|
||||
<beans:bean id="eventProducer" class="org.springframework.integration.xmpp.presence.XmppRosterEventProducer"/>
|
||||
|
||||
<inbound-channel-adapter ref="eventProducer" channel="outboundPresenceChannel">
|
||||
<poller fixed-rate="1000">
|
||||
</inbound-channel-adapter>
|
||||
|
||||
|
||||
<channel id="outboundPresenceChannel"/>
|
||||
|
||||
<xmpp:presence-outbound-channel-adapter xmpp-connection="testConnection" channel="outboundPresenceChannel"/>
|
||||
|
||||
@@ -16,10 +16,15 @@
|
||||
|
||||
package org.springframework.integration.xmpp.ignore;
|
||||
|
||||
import org.jivesoftware.smack.packet.Presence;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.integration.channel.DirectChannel;
|
||||
import org.springframework.integration.message.GenericMessage;
|
||||
import org.springframework.integration.xmpp.outbound.PresenceSendingMessageHandler;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
@@ -34,9 +39,14 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
public class OutboundPresenceTests {
|
||||
|
||||
@Autowired
|
||||
@Qualifier("outboundPresenceChannel")
|
||||
private DirectChannel input;
|
||||
@Test
|
||||
@Ignore
|
||||
//@Ignore
|
||||
public void testOutbound() throws Throwable {
|
||||
Presence presence = new Presence(Presence.Type.available);
|
||||
input.send(new GenericMessage<Presence>(presence));
|
||||
Thread.sleep(60 * 1000);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user