Does this mean we are adding Derby to the list of supported RDBMS for MB
4.0.0?

On Fri, May 19, 2017 at 9:05 AM, Pumudu Ruhunage <pum...@wso2.com> wrote:

> Can we consider javaDB(Derby)[1] which is part of JDK. since it's shipped
> with jdk, it'll be more suitable for unit tests instead of going for
> external databases/frameworks.
> Since we are not using any vendor-specific sql's in DAO it should support
> all required sql syntaxes without any issue.
>
> [1] http://www.oracle.com/technetwork/java/javadb/
> overview/javadb-156712.html
>
> Thanks,
>
> On Fri, May 19, 2017 at 8:11 AM, Pamod Sylvester <pa...@wso2.com> wrote:
>
>> (+) Adding @architecture
>>
>> On Thu, May 18, 2017 at 11:34 AM, Asanka Abeyweera <asank...@wso2.com>
>> wrote:
>>
>>> Are we planning to use stored procedures? If yes better to use a
>>> framework that is flexible enough.
>>>
>>> On Thu, May 18, 2017 at 10:59 AM, Ramith Jayasinghe <ram...@wso2.com>
>>> wrote:
>>>
>>>> if you want to mess with the database/data, this is the lib for that
>>>> (regardless of the test type).
>>>>
>>>> On Thu, May 18, 2017 at 10:48 AM, Manuri Amaya Perera <manu...@wso2.com
>>>> > wrote:
>>>>
>>>>> @Hasitha Actually that was for integration tests. I guess Ramith's
>>>>> suggestion would be better for unit tests. When writing integration tests
>>>>> we could look into the possibility of having containerized databases.
>>>>>
>>>>> Thanks,
>>>>> Manuri
>>>>>
>>>>> On Thu, May 18, 2017 at 10:42 AM, Ramith Jayasinghe <ram...@wso2.com>
>>>>> wrote:
>>>>>
>>>>>> I propose using http://dbunit.sourceforge.net.
>>>>>> easy api. and allows you to insert data into database before the test
>>>>>> and then clean up etc etc.
>>>>>>
>>>>>>
>>>>>> On Thu, May 18, 2017 at 10:40 AM, Fazlan Nazeem <fazl...@wso2.com>
>>>>>> wrote:
>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Thu, May 18, 2017 at 10:39 AM, Hasitha Hiranya <hasit...@wso2.com
>>>>>>> > wrote:
>>>>>>>
>>>>>>>> Hi Manuri,
>>>>>>>>
>>>>>>>> Was this approach taken for unit tests or integration tests?
>>>>>>>>
>>>>>>>> Thanks
>>>>>>>>
>>>>>>>
>>>>>>> This approach was taken for integration testing in APIM.
>>>>>>>
>>>>>>> For unit testing we are using Mockito framework for mocking out
>>>>>>> dependencies.
>>>>>>>
>>>>>>>>
>>>>>>>> On Thu, May 18, 2017 at 10:31 AM, Manuri Amaya Perera <
>>>>>>>> manu...@wso2.com> wrote:
>>>>>>>>
>>>>>>>>> Hi Pamod,
>>>>>>>>>
>>>>>>>>> API Manager team is using dynamically created containerized
>>>>>>>>> databases for some tests[1]. With this approach we can perform the 
>>>>>>>>> tests
>>>>>>>>> for several databases types. I think they have already implemented 
>>>>>>>>> this.
>>>>>>>>>
>>>>>>>>> Can we also do something like this?
>>>>>>>>>
>>>>>>>>> [1] [Build Team] Jenkins Build configuration on API Manager
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>> Manuri
>>>>>>>>>
>>>>>>>>> On Thu, May 18, 2017 at 10:23 AM, Pamod Sylvester <pa...@wso2.com>
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>> Hi All,
>>>>>>>>>>
>>>>>>>>>> When unit testing DAO layers what will be the best approach we
>>>>>>>>>> should be using ? some of the approaches would be the following,
>>>>>>>>>>
>>>>>>>>>> 1. Use an in-memory database ? (h2,Derby or HSSQLDB)
>>>>>>>>>>
>>>>>>>>>> *Pros*
>>>>>>>>>>
>>>>>>>>>>  - Easy to configure
>>>>>>>>>>  - SQL query executions will be covered
>>>>>>>>>>
>>>>>>>>>> *Cons*
>>>>>>>>>>
>>>>>>>>>>  - As mention in [1] tests will be specific to cover only the
>>>>>>>>>> features covered specific to the database which is being used (i.e 
>>>>>>>>>> h2)
>>>>>>>>>>  - Could also be thought of as an anti pattern for unit tests
>>>>>>>>>> (though it's an in-memory database this could be considered as an 
>>>>>>>>>> external
>>>>>>>>>> system)
>>>>>>>>>>
>>>>>>>>>> 2. Mock DB instance
>>>>>>>>>>
>>>>>>>>>> *Pros*
>>>>>>>>>>
>>>>>>>>>> - Since the control is on our side we could overcome the cons
>>>>>>>>>> mentioned in the 1st approach.
>>>>>>>>>>
>>>>>>>>>> *Cons*
>>>>>>>>>>
>>>>>>>>>> - Could make the implementation more complex in comparison to the
>>>>>>>>>> 1st approach
>>>>>>>>>>
>>>>>>>>>> Currently IMO option 1 would be a better option. Since currently
>>>>>>>>>> our code is based on ANSI SQL and we don't have triggers, PLSQL 
>>>>>>>>>> (which will
>>>>>>>>>> be database specific syntax which will require us to do mocks). 
>>>>>>>>>> thoughts ?
>>>>>>>>>> will there be a better option ?
>>>>>>>>>>
>>>>>>>>>> [1] https://blog.jooq.org/tag/unit-testing/
>>>>>>>>>>
>>>>>>>>>> Thanks,
>>>>>>>>>> Pamod
>>>>>>>>>> --
>>>>>>>>>> *Pamod Sylvester *
>>>>>>>>>>
>>>>>>>>>> *WSO2 Inc.; http://wso2.com <http://wso2.com>*
>>>>>>>>>> cell: +94 77 7779495 <+94%2077%20777%209495>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>>
>>>>>>>>> *Manuri Amaya Perera*
>>>>>>>>>
>>>>>>>>> *Software Engineer*
>>>>>>>>>
>>>>>>>>> *WSO2 Inc.*
>>>>>>>>>
>>>>>>>>> *Blog: http://manuriamayaperera.blogspot.com
>>>>>>>>> <http://manuriamayaperera.blogspot.com>*
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> *Hasitha Abeykoon*
>>>>>>>> Senior Software Engineer; WSO2, Inc.; http://wso2.com
>>>>>>>> *cell:* *+94 719363063*
>>>>>>>> *blog: **abeykoon.blogspot.com* <http://abeykoon.blogspot.com>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Thanks & Regards,
>>>>>>>
>>>>>>> Fazlan Nazeem
>>>>>>>
>>>>>>> *Senior Software Engineer*
>>>>>>>
>>>>>>> *WSO2 Inc*
>>>>>>> Mobile : +94772338839
>>>>>>> <%2B94%20%280%29%20773%20451194>
>>>>>>> fazl...@wso2.com
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Ramith Jayasinghe
>>>>>> Technical Lead
>>>>>> WSO2 Inc., http://wso2.com
>>>>>> lean.enterprise.middleware
>>>>>>
>>>>>> E: ram...@wso2.com
>>>>>> P: +94 777542851 <+94%2077%20754%202851>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>>
>>>>> *Manuri Amaya Perera*
>>>>>
>>>>> *Software Engineer*
>>>>>
>>>>> *WSO2 Inc.*
>>>>>
>>>>> *Blog: http://manuriamayaperera.blogspot.com
>>>>> <http://manuriamayaperera.blogspot.com>*
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Ramith Jayasinghe
>>>> Technical Lead
>>>> WSO2 Inc., http://wso2.com
>>>> lean.enterprise.middleware
>>>>
>>>> E: ram...@wso2.com
>>>> P: +94 777542851 <+94%2077%20754%202851>
>>>>
>>>
>>>
>>>
>>> --
>>> Asanka Abeyweera
>>> Senior Software Engineer
>>> WSO2 Inc.
>>>
>>> Phone: +94 712228648 <071%20222%208648>
>>> Blog: a5anka.github.io
>>>
>>> <https://wso2.com/signature>
>>>
>>
>>
>>
>> --
>> *Pamod Sylvester *
>>
>> *WSO2 Inc.; http://wso2.com <http://wso2.com>*
>> cell: +94 77 7779495 <+94%2077%20777%209495>
>>
>
>
>
> --
> Pumudu Ruhunage
> Software Engineer | WSO2 Inc
> M: +94 779 664493  | http://wso2.com
> <https://wso2.com/signature>
>



-- 
Asanka Abeyweera
Senior Software Engineer
WSO2 Inc.

Phone: +94 712228648
Blog: a5anka.github.io

<https://wso2.com/signature>
_______________________________________________
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to