[ 
https://issues.apache.org/jira/browse/BAHIR-65?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15630074#comment-15630074
 ] 

Christian Kadner commented on BAHIR-65:
---------------------------------------

Hi Senthil, 

thanks for taking a stab at this! The aim of this Task is to test that 
streaming data can be received and processed so we need to use OAuth 
credentials. 

 - https://dev.twitter.com/oauth/application-only ("...it won’t ... Connect in 
Streaming endpoints")
 - https://dev.twitter.com/streaming/overview/connecting ("Requests must be 
authorized ... OAuth")

I suggest that the  test case picks up the OAuth credentials from environment 
variables (each developer would have his own and we would configure our test 
server accordingly):

    // set OAuth credentials to be used by Twitter4j
    System.setProperty("twitter4j.oauth.consumerKey", 
System.getenv("TWITTER_OAUTH_ConsumerKey"))
    System.setProperty("twitter4j.oauth.consumerSecret", 
System.getenv("TWITTER_OAUTH_ConsumerSecret"))
    System.setProperty("twitter4j.oauth.accessToken", 
System.getenv("TWITTER_OAUTH_AccessToken"))
    System.setProperty("twitter4j.oauth.accessTokenSecret", 
System.getenv("TWITTER_OAUTH_AccessTokenSecret"))


> Add test that Twitter streaming connector can receive data
> ----------------------------------------------------------
>
>                 Key: BAHIR-65
>                 URL: https://issues.apache.org/jira/browse/BAHIR-65
>             Project: Bahir
>          Issue Type: Sub-task
>          Components: Spark Streaming Connectors
>            Reporter: Christian Kadner
>              Labels: test
>
> Add test cases that verify that the *Twitter streaming connector* can receive 
> streaming data.
> See [BAHIR-63|https://issues.apache.org/jira/browse/BAHIR-63]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to