Hi Reka,

We can't directly shift the existing test cases for tenants isolation. As
an example we are checking the status of the application with in a test
cases. In that case we need to pass the application name + tenant id to
retrieve the application related to that tenant.We can't directly use the
application name.

        Application application =

ApplicationManager.getApplications().getApplicationByTenant(applicationName,
tenantId);

So we need to change the test cases according to the tenant isolation.We
can include some additional test cases for tenancy related stuff.

Thanks,
Gayan


On Mon, Sep 14, 2015 at 11:29 AM, Reka Thirunavukkarasu <r...@wso2.com>
wrote:

> Hi
>
> On Fri, Sep 11, 2015 at 11:07 AM, Gayan Gunarathne <gay...@wso2.com>
> wrote:
>
>> Hi,
>>
>> On Fri, Sep 11, 2015 at 2:58 AM, Akila Ravihansa Perera <
>> raviha...@wso2.com> wrote:
>>
>>> Hi,
>>>
>>> I have been working on uplifting automation engine framework version to
>>> latest (v4.4.3) and migrating the existing test cases. I completed this
>>> task on stratos-4.1.x branch without any issues. But while doing the same
>>> on master branch I noticed that couple of integration tests have been
>>> commented out.
>>>
>> When I ran those tests I noticed lot of NPEs in Stratos side when
>>> creating cluster monitors and tenant isolation related tests were failing
>>> too. Not sure whether this is a problem with the integration test.
>>>
>> I don't see any commented integration tests in master branch[1].What are
>> the test cases getting failure?
>>
>>
>>> While going through the test cases I noticed that existing test cases
>>> for super admin user have been altered with tenant users. I think we should
>>> have created separate test cases for tenant isolation rather than modifying
>>> existing ones. Now the problem is we do not know whether super admin flow
>>> is broken with tenant isolation.
>>>
>>
>> There won't be a big difference for single tenant applications . So I
>> don't see specific reason to maintain the separate test cases for super
>> admin. For the multi tenant applications, we can have separate test cases
>> for super admin and tenant users.
>>
>>
>>>
>>> I noticed that there are few changes for scaling.drl file between master
>>> branch and stratos-4.1.x branch. We need to check why those two got
>>> deviated [1]. Apparently "delegator.delegateSpawn" method signature has
>>> been changed. Any idea?
>>>
>>
>> This has been changed for the publish health statistics related date
>> publishing purposes.Those changes are also merged to the master branch also.
>> @Thanuja, Can you please confirm those
>>
>> I think we should replace integration tests completely from stratos-4.1.x
>>> to master and create a separate test class with only tenant isolation
>>> related assertions. Group scaling, app bursting, termination order, startup
>>> order should be covered in integration tests for super admin, tenant admins
>>> and tenant users, regardless of tenant isolation. wdyt?
>>>
>> For multi tenant applications IMO also we may need to introduced seperate
>> test cases for super admins and tenant. But for single tenant we may don't
>> need a separate test case. Also please note all the servers running in the
>> super admin space for all the tenant users.
>>
>
> IMO, we don't need to alter the existing individual test cases. Rather we
> can let super admin and tenant users to execute these test cases again in
> their own space. In addition to that, we can write some tenancy related
> test cases to verify the tenant isolation separately. In that way, we can
> add more stuffs and it could be extensible as well. WDYT?
>
> Thanks,
> Reka
>
>
>>
>>> [1] https://www.diffnow.com/?report=wqlfa
>>>
>>> Thanks.
>>>
>>
>> [1]
>> https://github.com/apache/stratos/blob/master/products/stratos/modules/integration/src/test/resources/stratos-testing.xml
>>
>>
>>>
>>> --
>>> Akila Ravihansa Perera
>>> WSO2 Inc.;  http://wso2.com/
>>>
>>> Blog: http://ravihansa3000.blogspot.com
>>>
>>
>>
>>
>> --
>>
>> Gayan Gunarathne
>> Technical Lead, WSO2 Inc. (http://wso2.com)
>> Committer & PMC Member, Apache Stratos
>> email : gay...@wso2.com  | mobile : +94 775030545 <%2B94%20766819985>
>>
>>
>>
>
>
>
> --
> Reka Thirunavukkarasu
> Senior Software Engineer,
> WSO2, Inc.:http://wso2.com,
> Mobile: +94776442007
>
>
>


-- 

Gayan Gunarathne
Technical Lead, WSO2 Inc. (http://wso2.com)
Committer & PMC Member, Apache Stratos
email : gay...@wso2.com  | mobile : +94 775030545 <%2B94%20766819985>

Reply via email to