Hi Sameera,

All of the registry tests have been passing on the build that I have. Let me
check with updates from the UM kernel.

Thanks,
Senaka.

On Mon, Feb 28, 2011 at 4:23 PM, Sameera Jayasoma <[email protected]> wrote:

> Hi Senaka,
>
> I am getting a test failure in the registry.core module in Carbon core.
>
>
> -------------------------------------------------------------------------------
> Test set: org.wso2.carbon.registry.core.test.multitenant.MultiTenantTest
>
> -------------------------------------------------------------------------------
> Tests run: 3, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 4.403 sec
> <<< FAILURE!
> testVirtualRoots(org.wso2.carbon.registry.core.test.multitenant.MultiTenantTest)
> Time elapsed: 4.205 sec  <<< ERROR!
> org.wso2.carbon.registry.core.exceptions.RegistryException: Failed in
> getting the user realm for the tenantId: 1.
>     at
> org.wso2.carbon.registry.core.session.UserRegistry.init(UserRegistry.java:248)
>     at
> org.wso2.carbon.registry.core.session.UserRegistry.<init>(UserRegistry.java:206)
>     at
> org.wso2.carbon.registry.core.jdbc.EmbeddedRegistryService.getUserRegistry(EmbeddedRegistryService.java:426)
>     at
> org.wso2.carbon.registry.core.jdbc.EmbeddedRegistryService.getUserRegistry(EmbeddedRegistryService.java:408)
>     at
> org.wso2.carbon.registry.core.test.multitenant.MultiTenantTest.testVirtualRoots(MultiTenantTest.java:84)
> Caused by: org.wso2.carbon.user.core.UserStoreException
>     at
> org.wso2.carbon.registry.core.jdbc.realm.InMemoryRealmService.getTenantUserRealm(InMemoryRealmService.java:230)
>     at
> org.wso2.carbon.registry.core.session.UserRegistry.init(UserRegistry.java:239)
>     ... 30 more
>
> testUserStores(org.wso2.carbon.registry.core.test.multitenant.MultiTenantTest)
> Time elapsed: 0.106 sec  <<< ERROR!
> org.wso2.carbon.registry.core.exceptions.RegistryException: Failed in
> getting the user realm for the tenantId: 1.
>     at
> org.wso2.carbon.registry.core.session.UserRegistry.init(UserRegistry.java:248)
>     at
> org.wso2.carbon.registry.core.session.UserRegistry.<init>(UserRegistry.java:206)
>     at
> org.wso2.carbon.registry.core.jdbc.EmbeddedRegistryService.getUserRegistry(EmbeddedRegistryService.java:426)
>     at
> org.wso2.carbon.registry.core.jdbc.EmbeddedRegistryService.getUserRegistry(EmbeddedRegistryService.java:408)
>     at
> org.wso2.carbon.registry.core.test.multitenant.MultiTenantTest.testUserStores(MultiTenantTest.java:244)
> Caused by: org.wso2.carbon.user.core.UserStoreException
>     at
> org.wso2.carbon.registry.core.jdbc.realm.InMemoryRealmService.getTenantUserRealm(InMemoryRealmService.java:230)
>     at
> org.wso2.carbon.registry.core.session.UserRegistry.init(UserRegistry.java:239)
>     ... 30 more
>
> testClaims(org.wso2.carbon.registry.core.test.multitenant.MultiTenantTest)
> Time elapsed: 0.017 sec  <<< ERROR!
> org.wso2.carbon.registry.core.exceptions.RegistryException: Failed in
> getting the user realm for the tenantId: 1.
>     at
> org.wso2.carbon.registry.core.session.UserRegistry.init(UserRegistry.java:248)
>     at
> org.wso2.carbon.registry.core.session.UserRegistry.<init>(UserRegistry.java:206)
>     at
> org.wso2.carbon.registry.core.jdbc.EmbeddedRegistryService.getUserRegistry(EmbeddedRegistryService.java:426)
>     at
> org.wso2.carbon.registry.core.jdbc.EmbeddedRegistryService.getUserRegistry(EmbeddedRegistryService.java:408)
>     at
> org.wso2.carbon.registry.core.test.multitenant.MultiTenantTest.testClaims(MultiTenantTest.java:376)
> Caused by: org.wso2.carbon.user.core.UserStoreException
>     at
> org.wso2.carbon.registry.core.jdbc.realm.InMemoryRealmService.getTenantUserRealm(InMemoryRealmService.java:230)
>     at
> org.wso2.carbon.registry.core.session.UserRegistry.init(UserRegistry.java:239)
>     ... 30 more
>
> Please have a look
>
> Thanks
> Sameera
>
>
> On Mon, Feb 28, 2011 at 11:08 AM, Sameera Jayasoma <[email protected]>wrote:
>
>>
>>
>> On Sat, Feb 26, 2011 at 6:18 PM, Senaka Fernando <[email protected]> wrote:
>>
>>> Hi Sameera,
>>>
>>> On Sat, Feb 26, 2011 at 4:47 PM, Sameera Jayasoma <[email protected]>wrote:
>>>
>>>> Hi Senaka,
>>>>
>>>> Apologies for commiting without running the code without the tests. This
>>>> was done during the hackathon organized to cleanup pom file.
>>>
>>>
>>> That's fine. I just wanted to keep everyone updated, so that this will
>>> not be repeated.
>>>
>>>>
>>>> FYI, hereafter if you add dependencies specially for tests, please set
>>>> the scope as test. So that downstream people will know that these
>>>> dependencies are for tests.
>>>>
>>>> e.g.
>>>>         <dependency>
>>>>             <groupId>junit</groupId>
>>>>             <artifactId>junit</artifactId>
>>>> *            <scope>test</scope> *
>>>>         </dependency>
>>>>
>>>
>>> Unfortunately, due to Maven's inherent weirdness, test scope dependencies
>>> are not carried downstream. So, the above will not work. AmilaJ had already
>>> added back that dependency in the test scope. But, the Registry Kernel was
>>> not getting the transitive dependency properly.
>>>
>>
>> Yes. This is an issues with transitive dependencies and we are trying to
>> get rid of transitive dependencies completely, hopefully.
>>
>> Thanks
>> Sameera
>>
>>>
>>>> BTW, We found many test failures in 3.1.0 branch in registry related
>>>> components. Seems like we've released these products with test failures.
>>>>
>>>
>>> Yes, this is because we haven't paid attention about compiling with
>>> tests. The tests failures not due to code-level issues but its due to not
>>> initializing the tests properly. All the products are using the
>>> registry.extensions bundle from components, and sadly, no one noticed this.
>>>
>>> What was lacking is,
>>>
>>> Index:
>>> src/test/java/org/wso2/carbon/registry/extensions/test/utils/BaseTestCase.java
>>> ===================================================================
>>> ---
>>> src/test/java/org/wso2/carbon/registry/extensions/test/utils/BaseTestCase.java
>>> (revision 88269)
>>> +++
>>> src/test/java/org/wso2/carbon/registry/extensions/test/utils/BaseTestCase.java
>>> (working copy)
>>> @@ -29,6 +29,7 @@
>>>  import
>>> org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent;
>>>  import org.wso2.carbon.registry.core.jdbc.realm.InMemoryRealmService;
>>>  import org.wso2.carbon.user.core.service.RealmService;
>>> +import org.wso2.carbon.utils.multitenancy.CarbonContextHolder;
>>>
>>>  import org.wso2.carbon.user.core.UserRealm;
>>>
>>> @@ -44,6 +45,9 @@
>>>              }
>>>          }
>>>
>>> +        // The line below is responsible for initializing the cache.
>>> +        CarbonContextHolder.getCurrentCarbonContextHolder();
>>> +
>>>          String carbonHome = System.getProperty("carbon.home");
>>>          System.out.println("carbon home " + carbonHome);
>>>          String carbonXMLPath = carbonHome + File.separator +
>>> "repository"
>>>
>>> I have fixed this on the trunk in r88418. And, its not just the products,
>>> even the Core Carbon Server has issues, which is not due to a test
>>> initialization problem but due to a bug in the UM kernel. This was reported
>>> and was fixed after the release. There might be other areas containing test
>>> failures.
>>>
>>> So, we need to get serious about compiling with tests enabled, at least
>>> on the builder machines. And, to everybody on this list, if you ever see
>>> such a test failure, please be kind to report it on the mailing list.
>>>
>>> Thanks,
>>> Senaka.
>>>
>>>>
>>>> Sameera
>>>>
>>>>
>>>>
>>>> On Sat, Feb 26, 2011 at 2:59 PM, Senaka Fernando <[email protected]>wrote:
>>>>
>>>>> Hi Sameera,
>>>>>
>>>>> This commit has left the tests of the Registry Kernel broken. Please do
>>>>> compile with tests before making changes which involve getting rid of
>>>>> dependencies. It might have been wrong to have this dependency included in
>>>>> this manner, but, getting rid of it, and not compiling the source code 
>>>>> with
>>>>> tests enabled is simply unacceptable.
>>>>>
>>>>> FYI, I have fixed this issue in r88414.
>>>>>
>>>>> Thanks,
>>>>> Senaka.
>>>>>
>>>>> On Tue, Feb 8, 2011 at 3:31 PM, <[email protected]> wrote:
>>>>>
>>>>>> Author: sameera
>>>>>> Date: Tue Feb  8 02:01:28 2011
>>>>>> New Revision: 86991
>>>>>> URL: http://wso2.org/svn/browse/wso2?view=rev&revision=86991
>>>>>>
>>>>>> Log:
>>>>>> removed some unused dependencies
>>>>>>
>>>>>> Modified:
>>>>>>   trunk/carbon/core/org.wso2.carbon.user.core/pom.xml
>>>>>>
>>>>>> Modified: trunk/carbon/core/org.wso2.carbon.user.core/pom.xml
>>>>>> URL:
>>>>>> http://wso2.org/svn/browse/wso2/trunk/carbon/core/org.wso2.carbon.user.core/pom.xml?rev=86991&r1=86990&r2=86991&view=diff
>>>>>>
>>>>>> ==============================================================================
>>>>>> --- trunk/carbon/core/org.wso2.carbon.user.core/pom.xml (original)
>>>>>> +++ trunk/carbon/core/org.wso2.carbon.user.core/pom.xml Tue Feb  8
>>>>>> 02:01:28 2011
>>>>>> @@ -59,22 +59,13 @@
>>>>>>       <artifactId>commons-dbcp</artifactId>
>>>>>>     </dependency>
>>>>>>     <dependency>
>>>>>> -      <groupId>com.h2database.wso2</groupId>
>>>>>> -      <artifactId>h2-database-engine</artifactId>
>>>>>> -    </dependency>
>>>>>> -    <dependency>
>>>>>>       <groupId>org.wso2.carbon</groupId>
>>>>>>       <artifactId>org.wso2.carbon.logging</artifactId>
>>>>>>       <version>${pom.version}</version>
>>>>>>     </dependency>
>>>>>>     <dependency>
>>>>>> -      <groupId>org.apache.synapse</groupId>
>>>>>> -      <artifactId>synapse-securevault</artifactId>
>>>>>> -    </dependency>
>>>>>> -    <dependency>
>>>>>>         <groupId>org.wso2.pwprovider</groupId>
>>>>>>         <artifactId>org.wso2.pwprovider</artifactId>
>>>>>> -        <version>1.6.4</version>
>>>>>>     </dependency>
>>>>>>   </dependencies>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Carbon-commits mailing list
>>>>>> [email protected]
>>>>>> https://wso2.org/cgi-bin/mailman/listinfo/carbon-commits
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> *Senaka Fernando*
>>>>> Product Manager - WSO2 Governance Registry;
>>>>> Associate Technical Lead; WSO2, Inc.; http://wso2.com*
>>>>> Member; Apache Software Foundation; http://apache.org
>>>>>
>>>>> E-mail: senaka AT wso2.com
>>>>> **P: <%2B1%20408%20754%207388> <%2B1%20408%20754%207388>+1 408 754
>>>>> 7388; ext: 51736*; *M: 
>>>>> <%2B94%2077%20322%201818><%2B94%2077%20322%201818>+94
>>>>> 77 322 1818
>>>>> Linked-In: http://www.linkedin.com/in/senakafernando
>>>>>
>>>>> *Lean . Enterprise . Middleware
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Sameera Jayasoma
>>>> Technical Lead and Product Manager, WSO2 Carbon
>>>>
>>>> WSO2, Inc. (http://wso2.com)
>>>> email: [email protected]
>>>> blog: http://tech.jayasoma.org
>>>>
>>>> Lean . Enterprise . Middleware
>>>>
>>>
>>>
>>>
>>> --
>>> *Senaka Fernando*
>>> Product Manager - WSO2 Governance Registry;
>>> Associate Technical Lead; WSO2, Inc.; http://wso2.com*
>>> Member; Apache Software Foundation; http://apache.org
>>>
>>> E-mail: senaka AT wso2.com
>>> **P: <%2B1%20408%20754%207388>+1 408 754 7388; ext: 51736*; *M:
>>> <%2B94%2077%20322%201818>+94 77 322 1818
>>> Linked-In: http://www.linkedin.com/in/senakafernando
>>>
>>> *Lean . Enterprise . Middleware
>>>
>>>
>>
>>
>> --
>> Sameera Jayasoma
>> Technical Lead and Product Manager, WSO2 Carbon
>>
>> WSO2, Inc. (http://wso2.com)
>> email: [email protected]
>> blog: http://tech.jayasoma.org
>>
>> Lean . Enterprise . Middleware
>>
>
>
>
> --
> Sameera Jayasoma
> Technical Lead and Product Manager, WSO2 Carbon
>
> WSO2, Inc. (http://wso2.com)
> email: [email protected]
> blog: http://tech.jayasoma.org
>
> Lean . Enterprise . Middleware
>



-- 
*Senaka Fernando*
Product Manager - WSO2 Governance Registry;
Associate Technical Lead; WSO2, Inc.; http://wso2.com*
Member; Apache Software Foundation; http://apache.org

E-mail: senaka AT wso2.com
**P: +1 408 754 7388; ext: 51736*; *M: +94 77 322 1818
Linked-In: http://www.linkedin.com/in/senakafernando

*Lean . Enterprise . Middleware
_______________________________________________
Carbon-dev mailing list
[email protected]
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev

Reply via email to