Hi Lasantha,

On Tue, Apr 5, 2016 at 5:57 AM, Lasantha Fernando <[email protected]> wrote:

> Hi Kalpa,
>
> Sorry I couldn't reply earlier. Were you able to resolve this issue?
>
>
No worries. Yes, I could get it working with the following test
dependencies,

<dependency>
    <groupId>org.wso2.carbon</groupId>
    <artifactId>org.wso2.carbon.databridge.core</artifactId>
    <version>4.2.0</version>
    <scope>test</scope>
</dependency>
<dependency>
    <groupId>org.wso2.carbon</groupId>
    <artifactId>org.wso2.carbon.databridge.receiver.thrift</artifactId>
    <version>4.2.0</version>
    <scope>test</scope>
</dependency>



> The current ThriftTestServer uses the already wrapped components on the
> databridge receiver side, hence the heavy dependency to Carbon.
>
> If you want your test server to be independent from Carbon, I think the
> only option would be to generate the receiver side code yourself and add
> some minimal wrapping. Since we are using Thrift, you would not need to do
> much coding since you can generate the receiver service directly from the
> thrift service definitions available at [1]. The generated files used in
> databridge are available at [2] which you can use as a reference.
>
> I think we also have recently upgraded to Thrift 0.9.2 in commit [3] by
> Mohan. You can follow his commit to get an idea of what files will be
> generated and what sort of coding you would have to do on top of the
> generated files to write your own test server.
>
> This is the approach that comes to my mind to write a test server
> independent of carbon dependencies. Please suggest if there are possible
> other alternatives that might be easier or better.
>

Thanks a lot for the info, I will try writing a receiver from scratch.


>
> [1]
> https://github.com/wso2/carbon-analytics-common/tree/master/components/data-bridge/org.wso2.carbon.databridge.commons.thrift/src/main/resources
> [2]
> https://github.com/wso2/carbon-analytics-common/tree/master/components/data-bridge/org.wso2.carbon.databridge.commons.thrift/src/main/java/org/wso2/carbon/databridge/commons/thrift
> [3]
> https://github.com/wso2/carbon-analytics-common/commit/bc54e4156fc63fa3889b8e51011dda3c9410a4e8
>
> Thanks,
> Lasantha
>
> On 2 April 2016 at 13:10, Kalpa Welivitigoda <[email protected]> wrote:
>
>> Hi devs,
>>
>> Do we have $subject? . I am writing a tests to test http statistics
>> publishing in AS 6.0.0 which is almost independent from carbon dependencies
>> (ATM we have data bridge dependencies for data publishing though)
>>
>> I tried the thrift test server at [1] (this was mentioned in [2]) but it
>> seems it heavily depends on carbon dependencies. Since AS 6.0.0 is
>> independent from carbon dependencies I am looking for a way to write the
>> test also independent from carbon dependencies.
>>
>> [1]
>> https://github.com/wso2/carbon-analytics-common/blob/master/components/data-bridge/org.wso2.carbon.databridge.agent/src/test/java/org/wso2/carbon/databridge/agent/test/thrift/ThriftTestServer.java
>> [2] "[Dev] [Test Automation] Mocking Thrift server for an integration
>> test"
>>
>> --
>> Best Regards,
>>
>> Kalpa Welivitigoda
>> Software Engineer, WSO2 Inc. http://wso2.com
>> Email: [email protected]
>> Mobile: +94776509215
>>
>
>
>
> --
> *Lasantha Fernando*
> Senior Software Engineer - Data Technologies Team
> WSO2 Inc. http://wso2.com
>
> email: [email protected]
> mobile: (+94) 71 5247551
>



-- 
Best Regards,

Kalpa Welivitigoda
Software Engineer, WSO2 Inc. http://wso2.com
Email: [email protected]
Mobile: +94776509215
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to