INT-1222 added @Ignore to all integration tests that depend on an XMPP server, etc.
This commit is contained in:
@@ -13,6 +13,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.springframework.integration.xmpp.config;
|
package org.springframework.integration.xmpp.config;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
package org.springframework.integration.xmpp.messages;
|
package org.springframework.integration.xmpp.messages;
|
||||||
|
|
||||||
|
import org.junit.Ignore;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import org.springframework.test.context.ContextConfiguration;
|
import org.springframework.test.context.ContextConfiguration;
|
||||||
@@ -29,7 +30,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
|||||||
@RunWith(SpringJUnit4ClassRunner.class)
|
@RunWith(SpringJUnit4ClassRunner.class)
|
||||||
public class ConsoleChatTests {
|
public class ConsoleChatTests {
|
||||||
|
|
||||||
@Test
|
@Test @Ignore
|
||||||
public void run() throws Exception {
|
public void run() throws Exception {
|
||||||
Thread.sleep( 10 * 1000 );
|
Thread.sleep( 10 * 1000 );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
package org.springframework.integration.xmpp.messages;
|
package org.springframework.integration.xmpp.messages;
|
||||||
|
|
||||||
|
import org.junit.Ignore;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import org.springframework.test.context.ContextConfiguration;
|
import org.springframework.test.context.ContextConfiguration;
|
||||||
@@ -29,7 +30,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
|||||||
@RunWith(SpringJUnit4ClassRunner.class)
|
@RunWith(SpringJUnit4ClassRunner.class)
|
||||||
public class InboundXmppEndpointTests {
|
public class InboundXmppEndpointTests {
|
||||||
|
|
||||||
@Test
|
@Test @Ignore
|
||||||
public void run() throws Exception {
|
public void run() throws Exception {
|
||||||
Thread.sleep( 10 * 1000 );
|
Thread.sleep( 10 * 1000 );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
package org.springframework.integration.xmpp.messages;
|
package org.springframework.integration.xmpp.messages;
|
||||||
|
|
||||||
|
import org.junit.Ignore;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
|
|
||||||
@@ -32,7 +33,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
|||||||
@RunWith(SpringJUnit4ClassRunner.class)
|
@RunWith(SpringJUnit4ClassRunner.class)
|
||||||
public class OutboundXmppEndpointTests {
|
public class OutboundXmppEndpointTests {
|
||||||
|
|
||||||
@Test
|
@Test @Ignore
|
||||||
public void run() throws Exception {
|
public void run() throws Exception {
|
||||||
Thread.sleep(10 * 1000);
|
Thread.sleep(10 * 1000);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,22 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2002-2010 the original author or authors.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
package org.springframework.integration.xmpp.presence;
|
package org.springframework.integration.xmpp.presence;
|
||||||
|
|
||||||
|
import org.junit.Ignore;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import org.springframework.test.context.ContextConfiguration;
|
import org.springframework.test.context.ContextConfiguration;
|
||||||
@@ -16,7 +33,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
|||||||
@RunWith(SpringJUnit4ClassRunner.class)
|
@RunWith(SpringJUnit4ClassRunner.class)
|
||||||
public class InboundXmppRosterEventsEndpointTests {
|
public class InboundXmppRosterEventsEndpointTests {
|
||||||
|
|
||||||
@Test
|
@Test @Ignore
|
||||||
public void run() throws Exception {
|
public void run() throws Exception {
|
||||||
Thread.sleep( 60 * 1000);
|
Thread.sleep( 60 * 1000);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,22 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2002-2010 the original author or authors.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
package org.springframework.integration.xmpp.presence;
|
package org.springframework.integration.xmpp.presence;
|
||||||
|
|
||||||
|
import org.junit.Ignore;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import org.springframework.test.context.ContextConfiguration;
|
import org.springframework.test.context.ContextConfiguration;
|
||||||
@@ -16,7 +33,8 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
|||||||
@ContextConfiguration
|
@ContextConfiguration
|
||||||
@RunWith(SpringJUnit4ClassRunner.class)
|
@RunWith(SpringJUnit4ClassRunner.class)
|
||||||
public class OutboundXmppRosterEventsEndpointTests {
|
public class OutboundXmppRosterEventsEndpointTests {
|
||||||
@Test
|
|
||||||
|
@Test @Ignore
|
||||||
public void testOutbound() throws Throwable {
|
public void testOutbound() throws Throwable {
|
||||||
Thread.sleep( 60 * 1000);
|
Thread.sleep( 60 * 1000);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,22 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2002-2010 the original author or authors.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
package org.springframework.integration.xmpp.presence;
|
package org.springframework.integration.xmpp.presence;
|
||||||
|
|
||||||
|
import org.junit.Ignore;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import org.springframework.test.context.ContextConfiguration;
|
import org.springframework.test.context.ContextConfiguration;
|
||||||
@@ -20,7 +37,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
|||||||
@RunWith(SpringJUnit4ClassRunner.class)
|
@RunWith(SpringJUnit4ClassRunner.class)
|
||||||
public class PresenceMessageComboTests {
|
public class PresenceMessageComboTests {
|
||||||
|
|
||||||
@Test
|
@Test @Ignore
|
||||||
public void run () throws Throwable {
|
public void run () throws Throwable {
|
||||||
Thread.sleep( 60 * 1000);
|
Thread.sleep( 60 * 1000);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,19 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2002-2010 the original author or authors.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
package org.springframework.integration.xmpp.presence;
|
package org.springframework.integration.xmpp.presence;
|
||||||
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
@@ -6,24 +22,24 @@ import org.springframework.integration.core.Message;
|
|||||||
import org.springframework.integration.core.MessageHeaders;
|
import org.springframework.integration.core.MessageHeaders;
|
||||||
import org.springframework.integration.xmpp.XmppHeaders;
|
import org.springframework.integration.xmpp.XmppHeaders;
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* This class reacts to changes in
|
||||||
* This class reacts to changes in {@link org.jivesoftware.smack.packet.Presence} objects for a given account.
|
* {@link org.jivesoftware.smack.packet.Presence} objects for a given account.
|
||||||
*
|
*
|
||||||
* @author Josh Long
|
* @author Josh Long
|
||||||
* @since 2.0
|
* @since 2.0
|
||||||
*/
|
*/
|
||||||
public class XmppRosterEventConsumer {
|
public class XmppRosterEventConsumer {
|
||||||
|
|
||||||
@ServiceActivator
|
@ServiceActivator
|
||||||
public void presenceChanged ( Message<?> presenceEventMsg ) throws Exception {
|
public void presenceChanged(Message<?> presenceEventMsg) throws Exception {
|
||||||
System.out.println(StringUtils.repeat( "-" , 100));
|
System.out.println(StringUtils.repeat("-", 100));
|
||||||
String whosePresence = (String)presenceEventMsg.getHeaders().get( XmppHeaders.PRESENCE_FROM);
|
String whosePresence = (String) presenceEventMsg.getHeaders().get(XmppHeaders.PRESENCE_FROM);
|
||||||
System.out.println( "entries affected: " + whosePresence);
|
System.out.println("entries affected: " + whosePresence);
|
||||||
MessageHeaders messageHeaders = presenceEventMsg.getHeaders();
|
MessageHeaders messageHeaders = presenceEventMsg.getHeaders();
|
||||||
for( String h : messageHeaders.keySet() )
|
for (String h : messageHeaders.keySet()) {
|
||||||
System.out.println( String.format( "%s = %s", h, messageHeaders.get(h)));
|
System.out.println(String.format("%s = %s", h, messageHeaders.get(h)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,19 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2002-2010 the original author or authors.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
package org.springframework.integration.xmpp.presence;
|
package org.springframework.integration.xmpp.presence;
|
||||||
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
@@ -8,24 +24,29 @@ import org.springframework.integration.core.Message;
|
|||||||
import org.springframework.integration.message.*;
|
import org.springframework.integration.message.*;
|
||||||
import org.springframework.integration.xmpp.XmppHeaders;
|
import org.springframework.integration.xmpp.XmppHeaders;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is used in {@link org.springframework.integration.xmpp.presence.OutboundXmppRosterEventsEndpointTests} to produce fake status / presence updates.
|
* This is used in
|
||||||
*
|
* {@link org.springframework.integration.xmpp.presence.OutboundXmppRosterEventsEndpointTests}
|
||||||
|
* to produce fake status / presence updates.
|
||||||
|
*
|
||||||
* @author Josh Long
|
* @author Josh Long
|
||||||
* @since 2.0
|
* @since 2.0
|
||||||
*/
|
*/
|
||||||
public class XmppRosterEventProducer implements MessageSource<String> {
|
public class XmppRosterEventProducer implements MessageSource<String> {
|
||||||
public Message<String> receive() {
|
|
||||||
try {
|
public Message<String> receive() {
|
||||||
Thread.sleep(1000 * 10);
|
try {
|
||||||
} catch (InterruptedException e) {
|
Thread.sleep(1000 * 10);
|
||||||
// eat it
|
}
|
||||||
}
|
catch (InterruptedException e) {
|
||||||
return (Math.random() > .5) ?
|
// eat it
|
||||||
MessageBuilder.withPayload(StringUtils.EMPTY).setHeader(XmppHeaders.PRESENCE_MODE, Presence.Mode.chat).setHeader(XmppHeaders.PRESENCE_TYPE, Presence.Type.available)
|
}
|
||||||
.setHeader(XmppHeaders.PRESENCE_STATUS, "She Loves me").build() :
|
return (Math.random() > .5) ? MessageBuilder.withPayload(StringUtils.EMPTY).setHeader(
|
||||||
MessageBuilder.withPayload(StringUtils.EMPTY).setHeader(XmppHeaders.PRESENCE_MODE, Presence.Mode.dnd).setHeader(XmppHeaders.PRESENCE_TYPE, Presence.Type.available)
|
XmppHeaders.PRESENCE_MODE, Presence.Mode.chat).setHeader(XmppHeaders.PRESENCE_TYPE,
|
||||||
.setHeader(XmppHeaders.PRESENCE_STATUS, "She Loves me not").build();
|
Presence.Type.available).setHeader(XmppHeaders.PRESENCE_STATUS, "She Loves me").build()
|
||||||
}
|
: MessageBuilder.withPayload(StringUtils.EMPTY).setHeader(XmppHeaders.PRESENCE_MODE, Presence.Mode.dnd)
|
||||||
|
.setHeader(XmppHeaders.PRESENCE_TYPE, Presence.Type.available).setHeader(
|
||||||
|
XmppHeaders.PRESENCE_STATUS, "She Loves me not").build();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user