Skip to content

Commit

Permalink
TFJ-397 SiteStreamTest#testStream was broken as SiteStreamImpl now ha…
Browse files Browse the repository at this point in the history
…ndles listners asynchronously
  • Loading branch information
yusuke committed Dec 7, 2010
1 parent 15bfe13 commit 52fc9b7
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions twitter4j-core/src/test/java/twitter4j/SiteStreamTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,25 @@ public void testStream() throws Exception {
listeners[0] = this;
received.clear();
siteStream.next(listeners);
assertEquals(6358482, received.get(0)[0]);
synchronized(this){
this.wait(200);
}
assertEquals("onfriendlist", received.get(0)[0]);
assertEquals(6358482, received.get(0)[1]);
received.clear();
siteStream.next(listeners);
assertEquals(new Integer(6358481), received.get(0)[0]);
synchronized(this){
this.wait(200);
}
assertEquals("onfriendlist", received.get(0)[0]);
assertEquals(new Integer(6358481), received.get(0)[1]);
received.clear();
siteStream.next(listeners);
assertEquals(new Integer(4933401), received.get(0)[0]);
synchronized(this){
this.wait(200);
}
assertEquals("onfriendlist", received.get(0)[0]);
assertEquals(new Integer(4933401), received.get(0)[1]);
}

public void testSiteStream() throws Exception {
Expand Down

0 comments on commit 52fc9b7

Please sign in to comment.