Re: [Dev] [MB] Issue when writing dlc related test cases in integration test suite

2015-03-23 Thread Indika Sampath
Hi Pumudu,

Did you enabled following configuration in broker.xml before test run ?
This is by default commented.

messageStore
class=org.wso2.andes.store.rdbms.h2.H2MemMessageStoreImpl
/messageStore

contextStore
class=org.wso2.andes.store.rdbms.h2.H2MemAndesContextStoreImpl
/contextStore

Cheers!


On Mon, Mar 23, 2015 at 10:26 PM, Pumudu Ruhunage pum...@wso2.com wrote:

 Hi,

 I came across following issue while writing integration test case for dlc
 queue path.
 following are the steps of the test case.
 1. Start queue subscriber to dlctenant1.com/tenantQueue, user
 'dlctenantuser' at 'dlctenant1.com' domain (this subscriber has set to
 client acknowledgement mode as well).
 2. Publish 1 queue message to dlctenant1.com/tenantQueue.
 3. Since subscriber never acknowledge, after retry 10 time this queue
 message will be moved tenant's dlc queue.
 4. This test case tests if a queue message exist in tenant's dlc queue and
 it's not exist in super tenant admin's dlc queue. (there are two
 assertions)
 Test passed successfully in H2 embedded(normal) mode database, but same
 test failed on H2 in-memory mode database with assertion failure.

 As i understood following was the cause for this issue.
 AFAIK mb test suite create tenant/super tenant users when integration test
 suite starts. dlc queues for each tenant user/admin also creates when
 creating tenant users/admins. Tenant users/admins are created in carbon
 registry database (which is constant throughout the test suite) but dlc
 queues are only created in H2 embedded(normal) database. Currently in H2
 in-memory database mode dlc queues were never created for any of the tenant
 user/admin. Because of this, dlc queue path can't be tested in H2 in-memory
 mode.

 How can we overcome this issue ? WDYT?

 Regards,
 --
 Pumudu Ruhunage
 Associate Software Engineer | WSO2 Inc
 M: +94 779 664493  | http://wso2.com




-- 
Indika Sampath
Software Engineer
WSO2 Inc.
http://wso2.com

Phone: +94 716 424 744
Blog: http://indikasampath.blogspot.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [MB] Issue when writing dlc related test cases in integration test suite

2015-03-23 Thread Pumudu Ruhunage
Hi,

I came across following issue while writing integration test case for dlc
queue path.
following are the steps of the test case.
1. Start queue subscriber to dlctenant1.com/tenantQueue, user
'dlctenantuser' at 'dlctenant1.com' domain (this subscriber has set to
client acknowledgement mode as well).
2. Publish 1 queue message to dlctenant1.com/tenantQueue.
3. Since subscriber never acknowledge, after retry 10 time this queue
message will be moved tenant's dlc queue.
4. This test case tests if a queue message exist in tenant's dlc queue and
it's not exist in super tenant admin's dlc queue. (there are two
assertions)
Test passed successfully in H2 embedded(normal) mode database, but same
test failed on H2 in-memory mode database with assertion failure.

As i understood following was the cause for this issue.
AFAIK mb test suite create tenant/super tenant users when integration test
suite starts. dlc queues for each tenant user/admin also creates when
creating tenant users/admins. Tenant users/admins are created in carbon
registry database (which is constant throughout the test suite) but dlc
queues are only created in H2 embedded(normal) database. Currently in H2
in-memory database mode dlc queues were never created for any of the tenant
user/admin. Because of this, dlc queue path can't be tested in H2 in-memory
mode.

How can we overcome this issue ? WDYT?

Regards,
-- 
Pumudu Ruhunage
Associate Software Engineer | WSO2 Inc
M: +94 779 664493  | http://wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [MB] Issue when writing dlc related test cases in integration test suite

2015-03-23 Thread Asitha Nanayakkara
In H2 in memory mode we don't have the queues created on H2 embedded mode
but have the tenant user details in registry. SInce we use embedded carbon
db.

Therefore before we do the H2 in memory mode I think we need unpack a fresh
pack an go through the tenant user creation process. In addition to what we
do at test suite start-up.
I think we should be able to do that.

Regards,

On Mon, Mar 23, 2015 at 10:55 PM, Indika Sampath indi...@wso2.com wrote:

 Hi Pumudu,

 Did you enabled following configuration in broker.xml before test run ?
 This is by default commented.

 messageStore
 class=org.wso2.andes.store.rdbms.h2.H2MemMessageStoreImpl
 /messageStore

 contextStore
 class=org.wso2.andes.store.rdbms.h2.H2MemAndesContextStoreImpl
 /contextStore

 Cheers!


 On Mon, Mar 23, 2015 at 10:26 PM, Pumudu Ruhunage pum...@wso2.com wrote:

 Hi,

 I came across following issue while writing integration test case for dlc
 queue path.
 following are the steps of the test case.
 1. Start queue subscriber to dlctenant1.com/tenantQueue, user
 'dlctenantuser' at 'dlctenant1.com' domain (this subscriber has set to
 client acknowledgement mode as well).
 2. Publish 1 queue message to dlctenant1.com/tenantQueue.
 3. Since subscriber never acknowledge, after retry 10 time this queue
 message will be moved tenant's dlc queue.
 4. This test case tests if a queue message exist in tenant's dlc queue
 and it's not exist in super tenant admin's dlc queue. (there are two
 assertions)
 Test passed successfully in H2 embedded(normal) mode database, but same
 test failed on H2 in-memory mode database with assertion failure.

 As i understood following was the cause for this issue.
 AFAIK mb test suite create tenant/super tenant users when integration
 test suite starts. dlc queues for each tenant user/admin also creates when
 creating tenant users/admins. Tenant users/admins are created in carbon
 registry database (which is constant throughout the test suite) but dlc
 queues are only created in H2 embedded(normal) database. Currently in H2
 in-memory database mode dlc queues were never created for any of the tenant
 user/admin. Because of this, dlc queue path can't be tested in H2 in-memory
 mode.

 How can we overcome this issue ? WDYT?

 Regards,
 --
 Pumudu Ruhunage
 Associate Software Engineer | WSO2 Inc
 M: +94 779 664493  | http://wso2.com




 --
 Indika Sampath
 Software Engineer
 WSO2 Inc.
 http://wso2.com

 Phone: +94 716 424 744
 Blog: http://indikasampath.blogspot.com/




-- 
*Asitha Nanayakkara*
Software Engineer
WSO2, Inc. http://wso2.com/
Mob: + 94 77 85 30 682
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [MB] Issue when writing dlc related test cases in integration test suite

2015-03-23 Thread Pumudu Ruhunage
Hi,

+1 for Asitha's suggestion.

@Indika, currently test suite replace the original broker.xml with another
broker.xml with these h2 in-mem settings and server restarts
in org.wso2.mb.integration.tests.amqp.functional.StartH2MemMode class.
After server restarts successfully h2 in-memory tests will start to run.

Regards,

On Mon, Mar 23, 2015 at 11:16 PM, Asitha Nanayakkara asi...@wso2.com
wrote:

 In H2 in memory mode we don't have the queues created on H2 embedded mode
 but have the tenant user details in registry. SInce we use embedded carbon
 db.

 Therefore before we do the H2 in memory mode I think we need unpack a
 fresh pack an go through the tenant user creation process. In addition to
 what we do at test suite start-up.
 I think we should be able to do that.

 Regards,

 On Mon, Mar 23, 2015 at 10:55 PM, Indika Sampath indi...@wso2.com wrote:

 Hi Pumudu,

 Did you enabled following configuration in broker.xml before test run ?
 This is by default commented.

 messageStore
 class=org.wso2.andes.store.rdbms.h2.H2MemMessageStoreImpl
 /messageStore

 contextStore
 class=org.wso2.andes.store.rdbms.h2.H2MemAndesContextStoreImpl
 /contextStore

 Cheers!


 On Mon, Mar 23, 2015 at 10:26 PM, Pumudu Ruhunage pum...@wso2.com
 wrote:

 Hi,

 I came across following issue while writing integration test case for
 dlc queue path.
 following are the steps of the test case.
 1. Start queue subscriber to dlctenant1.com/tenantQueue, user
 'dlctenantuser' at 'dlctenant1.com' domain (this subscriber has set to
 client acknowledgement mode as well).
 2. Publish 1 queue message to dlctenant1.com/tenantQueue.
 3. Since subscriber never acknowledge, after retry 10 time this queue
 message will be moved tenant's dlc queue.
 4. This test case tests if a queue message exist in tenant's dlc queue
 and it's not exist in super tenant admin's dlc queue. (there are two
 assertions)
 Test passed successfully in H2 embedded(normal) mode database, but same
 test failed on H2 in-memory mode database with assertion failure.

 As i understood following was the cause for this issue.
 AFAIK mb test suite create tenant/super tenant users when integration
 test suite starts. dlc queues for each tenant user/admin also creates when
 creating tenant users/admins. Tenant users/admins are created in carbon
 registry database (which is constant throughout the test suite) but dlc
 queues are only created in H2 embedded(normal) database. Currently in H2
 in-memory database mode dlc queues were never created for any of the tenant
 user/admin. Because of this, dlc queue path can't be tested in H2 in-memory
 mode.

 How can we overcome this issue ? WDYT?

 Regards,
 --
 Pumudu Ruhunage
 Associate Software Engineer | WSO2 Inc
 M: +94 779 664493  | http://wso2.com




 --
 Indika Sampath
 Software Engineer
 WSO2 Inc.
 http://wso2.com

 Phone: +94 716 424 744
 Blog: http://indikasampath.blogspot.com/




 --
 *Asitha Nanayakkara*
 Software Engineer
 WSO2, Inc. http://wso2.com/
 Mob: + 94 77 85 30 682




-- 
Pumudu Ruhunage
Associate Software Engineer | WSO2 Inc
M: +94 779 664493  | http://wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev