reran all live integration tests to verify the twitter adapters work with the new domain models and threading support.
This commit is contained in:
@@ -15,8 +15,11 @@
|
||||
*/
|
||||
package org.springframework.integration.twitter;
|
||||
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
|
||||
|
||||
@@ -27,19 +30,20 @@ import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
|
||||
* @author Josh Long
|
||||
*/
|
||||
@ContextConfiguration
|
||||
public class TestRecievingUsingNamespace extends AbstractJUnit4SpringContextTests {
|
||||
public class TestRecievingUsingNamespace
|
||||
extends AbstractJUnit4SpringContextTests {
|
||||
@Autowired
|
||||
private TwitterAnnouncer twitterAnnouncer;
|
||||
|
||||
@Autowired private TwitterAnnouncer twitterAnnouncer;
|
||||
@Test
|
||||
@Ignore
|
||||
public void testIt() throws Throwable {
|
||||
long ctr = 0;
|
||||
long s = 1000;
|
||||
|
||||
@Test
|
||||
//@Ignore
|
||||
public void testIt() throws Throwable {
|
||||
long ctr = 0;
|
||||
long s = 1000;
|
||||
|
||||
while (ctr < (s * 60 * 3)) {
|
||||
Thread.sleep(s);
|
||||
ctr += s;
|
||||
}
|
||||
}
|
||||
while (ctr < (s * 60 * 3)) {
|
||||
Thread.sleep(s);
|
||||
ctr += s;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ import org.springframework.integration.support.MessageBuilder;
|
||||
import org.springframework.integration.twitter.model.Twitter4jGeoLocationImpl;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
|
||||
@@ -41,11 +42,11 @@ public class TestSendingDMsUsingNamespace extends AbstractJUnit4SpringContextTes
|
||||
@Value("#{out}") private MessageChannel channel;
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Ignore
|
||||
public void testSendingATweet() throws Throwable {
|
||||
|
||||
String dmUsr = System.getProperties().getProperty("twitter.dm.user");
|
||||
|
||||
Assert.notNull( dmUsr , "the DM user's null");
|
||||
MessageBuilder<String> mb = MessageBuilder.withPayload("'Hello world!', from the Spring Integration outbound Twitter adapter")
|
||||
.setHeader(TwitterHeaders.TWITTER_GEOLOCATION, new Twitter4jGeoLocationImpl(-76.226823, 23.642465)) // antarctica
|
||||
.setHeader(TwitterHeaders.TWITTER_DISPLAY_COORDINATES, true);
|
||||
|
||||
@@ -36,9 +36,9 @@
|
||||
<context:component-scan
|
||||
base-package="org.springframework.integration.twitter"/>
|
||||
|
||||
<context:property-placeholder
|
||||
location="classpath:twitter.properties"
|
||||
ignore-unresolvable="true"/>
|
||||
<context:property-placeholder
|
||||
location="file://${user.home}/Desktop/twitter.properties"
|
||||
ignore-unresolvable="true"/>
|
||||
|
||||
<twitter:twitter-connection
|
||||
id="tc"
|
||||
|
||||
@@ -33,8 +33,6 @@ import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
|
||||
@ContextConfiguration
|
||||
public class TestSendingUpdatesUsingNamespace extends AbstractJUnit4SpringContextTests {
|
||||
|
||||
|
||||
|
||||
private MessagingTemplate messagingTemplate = new MessagingTemplate();
|
||||
|
||||
@Value("#{out}") private MessageChannel channel;
|
||||
@@ -42,10 +40,9 @@ public class TestSendingUpdatesUsingNamespace extends AbstractJUnit4SpringContex
|
||||
@Test
|
||||
@Ignore
|
||||
public void testSendingATweet() throws Throwable {
|
||||
MessageBuilder<String> mb = MessageBuilder.withPayload("test message 1")
|
||||
MessageBuilder<String> mb = MessageBuilder.withPayload("simple test demonstrating the ability to encode location information")
|
||||
.setHeader(TwitterHeaders.TWITTER_IN_REPLY_TO_STATUS_ID, 21927437001L)
|
||||
.setHeader(TwitterHeaders.TWITTER_GEOLOCATION,
|
||||
new Twitter4jGeoLocationImpl(-76.226823, 23.642465)) // antarctica
|
||||
.setHeader(TwitterHeaders.TWITTER_GEOLOCATION, new Twitter4jGeoLocationImpl(-76.226823, 23.642465)) // antarctica
|
||||
.setHeader(TwitterHeaders.TWITTER_DISPLAY_COORDINATES, true);
|
||||
Message<String> m = mb.build();
|
||||
this.messagingTemplate.send(this.channel, m);
|
||||
|
||||
Reference in New Issue
Block a user