incubator-esme-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vdic...@apache.org
Subject svn commit: r982927 - in /incubator/esme/trunk/server/src: main/scala/org/apache/esme/api/TwitterAPI.scala test/scala/org/apache/esme/api/TwitterAPITest.scala
Date Fri, 06 Aug 2010 10:32:19 GMT
Author: vdichev
Date: Fri Aug  6 10:32:18 2010
New Revision: 982927

URL: http://svn.apache.org/viewvc?rev=982927&view=rev
Log:
Fix bug where message posted via Twitter API did not appear in followers' timeline.

Modified:
    incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/TwitterAPI.scala
    incubator/esme/trunk/server/src/test/scala/org/apache/esme/api/TwitterAPITest.scala

Modified: incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/TwitterAPI.scala
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/TwitterAPI.scala?rev=982927&r1=982926&r2=982927&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/TwitterAPI.scala (original)
+++ incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/TwitterAPI.scala Fri Aug
 6 10:32:18 2010
@@ -240,7 +240,12 @@ abstract class TwitterAPI {
                                source(req.param("source") openOr "twitterapi").
                                setTextAndTags(text, Nil, None))
     yield {
-      Distributor ! Distributor.AddMessageToMailbox(user.id.is, msg.saveMe, NoReason)
+      Distributor ! Distributor.UserCreatedMessage(user.id.is, text, Nil,
+                                                   millis,
+                                                   None,
+                                                   msg.source,
+                                                   None,
+                                                   None)
       Right(Map("status" -> msgData(msg)))
     }
   }

Modified: incubator/esme/trunk/server/src/test/scala/org/apache/esme/api/TwitterAPITest.scala
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/test/scala/org/apache/esme/api/TwitterAPITest.scala?rev=982927&r1=982926&r2=982927&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/test/scala/org/apache/esme/api/TwitterAPITest.scala (original)
+++ incubator/esme/trunk/server/src/test/scala/org/apache/esme/api/TwitterAPITest.scala Fri
Aug  6 10:32:18 2010
@@ -163,10 +163,11 @@ object TwitterAPISpecs extends Specifica
     }
     
     "let follower see user's message in home timeline" in {
-      // TODO: currently fails
-      // post("/statuses/update.xml", "status" -> "user_msg") \\(<text>user_msg</text>)
+      post("/statuses/update.xml", "status" -> "user_msg") \\(<text>user_msg</text>)
+      // wait till the message appears in the timeline
+      Thread.sleep(2000L)
       
-      // get("/statuses/home_timeline.xml", followerClient, Nil) \\(<text>user_msg</text>)
+      get("/statuses/home_timeline.xml", followerClient, Nil) \\(<text>user_msg</text>)
     }
     
     "not let user see follower's message in home timeline" in {



Mime
View raw message