Examples of forceEmptyQueueAndRefresh()


Examples of de.jetwick.es.ElasticTweetSearch.forceEmptyQueueAndRefresh()

        tweetConsumer.interrupt();
        tweetProducerThread.interrupt();
        checkExceptions(exceptionMap);

        tweetSearch.forceEmptyQueueAndRefresh();
        List<JTweet> res = tweetSearch.searchTweets(new TweetQuery().addFilterQuery(ElasticTweetSearch.USER, "timetabling"));
        assertEquals(1, res.size());
        assertEquals(1, res.get(0).getUrlEntries().size());
        // no resolving for now
        assertTrue(res.get(0).getUrlEntries().iterator().next().getResolvedUrl().equals("http://apne.ws/dERa4A"));
View Full Code Here

Examples of de.jetwick.es.ElasticTweetSearch.forceEmptyQueueAndRefresh()

        tweetProducerThread.start();
        Thread.sleep(500);

        tweetConsumer.interrupt();
        checkExceptions(exceptionMap);
        tweetSearch.forceEmptyQueueAndRefresh();

        Set<JUser> users = new LinkedHashSet<JUser>();
        tweetSearch.query(users, new TweetQuery().addFilterQuery(ElasticTweetSearch.USER, "timetabling"));
        assertEquals(2, users.iterator().next().getOwnTweets().size());
View Full Code Here

Examples of de.jetwick.es.ElasticTweetSearch.forceEmptyQueueAndRefresh()

        tweetProducerThread.setUncaughtExceptionHandler(excHandler);
        tweetProducerThread.start();
        // let tweetconsumer do its work
        Thread.sleep(500);
               
        tweetSearch.forceEmptyQueueAndRefresh();
        List<JTweet> tweets = tweetSearch.searchTweets(new TweetQuery().setSort(ElasticTweetSearch.RT_COUNT, "desc"));
        assertEquals(2, tweets.size());
        assertEquals(1, tweets.get(0).getRetweetCount());
        assertEquals(0, tweets.get(1).getRetweetCount());       
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.