On Sat, May 5, 2012 at 12:08 AM, Senaka Fernando <sen...@wso2.com> wrote:

> Hi Subash,
>
> Great. Now we should check into the situation of how you could end up
> getting 2 schemas having the same ID, whether the artifact index is having
> issues or whether it is something else. This is definitely a registry issue
> as it seems.
>

Hi Senaka,

Regarding Schema test mentioned above, there were two update calls and then
the search takes place. I thought that there is a possibility of executing
the threads of find schema as well as the 2nd schema update while running
first schema update call and ended up having duplicate schemas.

So add a thread sleep in between these calls so that they get enough time.
And I didn't see Schema test failing for last 3,4 builds since I add the
sleep. Same did to WSDLAddTest and didn't see a failure since then either.

Don't know why BackwardAssociationHandlerTestCase failing.(But I found out
that, in the failing scenario, when finds the target resource path from
association tree, it returns an empty String as the association tree )

Let's see the next couple of builds also to verify this.



>
> Thanks,
> Senaka.
>
>
> On Thu, May 3, 2012 at 3:14 PM, Subash Chaturanga <sub...@wso2.com> wrote:
>
>>
>>
>> On Thu, May 3, 2012 at 3:00 PM, Subash Chaturanga <sub...@wso2.com>wrote:
>>
>>> Hi Senaka,
>>> I have very recently added Schema Test Case which fails randomly with
>>> proper logs and with the recent test failure [1], I got this log.
>>>
>>>
>> FYI, if you see the  test case, it does two updateSchema() calls followed
>> by an addSchema() call. Here's the call stack.
>>
>> #addSchema()
>> #updateSchema() -  with the change in tns
>> #updateSchema() - update without a change to the schema
>>
>> #findSchemas() and returns those 3 schemas.
>>
>>
>>
>>> build       02-May-2012 18:24:06    [2012-05-02 18:24:06,845]  INFO 
>>> {org.wso2.carbon.registry.governance.api.test.SchemaTestCase} -  
>>> ############## testAddSchema started ...###################
>>>
>>>
>>>
>>> *build      02-May-2012 18:24:08    [2012-05-02 18:24:08,528]  INFO 
>>> {org.wso2.carbon.registry.governance.api.test.SchemaTestCase} -  
>>> ########Schema 
>>> name{http://bar.org/purchasing}ddbecf2d-9fba-49f1-a135-c0683fe74db5.xsd  
>>> schemaID : ddbecf2d-9fba-49f1-a135-c0683fe74db5
>>> build       02-May-2012 18:24:08    [2012-05-02 18:24:08,528]  INFO 
>>> {org.wso2.carbon.registry.governance.api.test.SchemaTestCase} -  
>>> ########Schema name{http://ww2.wso2.org/schema-test}purchasing.xsd  
>>> schemaID : 7b14447c-c54f-494c-b1a3-dc37dca949a2
>>> build       02-May-2012 18:24:08    [2012-05-02 18:24:08,528]  INFO 
>>> {org.wso2.carbon.registry.governance.api.test.SchemaTestCase} -  
>>> ########Schema name{http://ww2.wso2.org/schema-test}purchasing.xsd  
>>> schemaID : 7b14447c-c54f-494c-b1a3-dc37dca949a2*
>>>
>>> build       02-May-2012 18:24:08    [2012-05-02 18:24:08,528]  INFO 
>>> {org.wso2.carbon.registry.governance.api.test.SchemaTestCase} -  
>>> ########Schema Len:3
>>>
>>>
>>> ( FYI, This test basically add  a schema with the namespce
>>> http://bar.org/purchasing and then it modifies the tns to
>>> http://ww2.wso2.org/schema-test and update the schema.)
>>>
>>> The italic logs shows the schemas which return from findSchemas() method
>>> and it will print schema name and schemaID.
>>> There suppose to be two schemas in return and obviously *it is. But as
>>> the log shows, the updated schema has repeated twice.
>>> Which seems to me, is not a problem of threads in testng but from
>>> registry. Because there is no other test that add a schema with the above
>>> updated tns.
>>>
>>> Any ideas ?
>>>
>>> [1] - http://wso2.org/bamboo/browse/WSO2CARBON-PRODUCTS-JOB1-84
>>>
>>>
>>> On Thu, Apr 26, 2012 at 12:43 PM, Subash Chaturanga <sub...@wso2.com>wrote:
>>>
>>>>
>>>>
>>>> On Fri, Apr 20, 2012 at 11:28 AM, Subash Chaturanga <sub...@wso2.com>wrote:
>>>>
>>>>>
>>>>>
>>>>> On Fri, Apr 20, 2012 at 10:30 AM, Afkham Azeez <az...@wso2.com> wrote:
>>>>>
>>>>>>
>>>>>>
>>>>>> On Fri, Apr 20, 2012 at 8:50 AM, Vijitha Kumara <viji...@wso2.com>wrote:
>>>>>>
>>>>>>> Yes, perhaps those were written with the Junit in mind :)
>>>>>>>
>>>>>>
>>>>>> Exactly, in JUnit it is the other way about. I too realized this when
>>>>>> I read their API docs and then corrected some of my mistakes. I guess 
>>>>>> there
>>>>>> may be tons of incorrectly written assert statements :(
>>>>>>
>>>>>
>>>>> Yes Azeez, you're quite right.
>>>>> I also checked with few other product integration tests as well. And
>>>>> there are loads of them in testng migrated integration tests. But they
>>>>> didn't get noticed until an assert fails and you find hard to understand
>>>>> the assertion failure message. But we have to fix them all.
>>>>>
>>>> Hi
>>>> All  greg integration tests have migrated with proper testng assertions.
>>>>
>>>>
>>>>>
>>>>> I have started refactoring them for GReg and there're quite a many to
>>>>> fix :(.
>>>>>
>>>>>
>>>>>>
>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Apr 19, 2012 at 8:18 PM, Afkham Azeez <az...@wso2.com>wrote:
>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Thu, Apr 19, 2012 at 1:47 PM, Vijitha Kumara 
>>>>>>>> <viji...@wso2.com>wrote:
>>>>>>>>
>>>>>>>>>
>>>>>>>>> This seems bit strange, the real test case expects the length to
>>>>>>>>> be 2 but the test failure complains it expects 3...
>>>>>>>>
>>>>>>>>
>>>>>>>> The way the parameters have been passed to that test is incorrect.
>>>>>>>> It should be;
>>>>>>>>
>>>>>>>> *assertEquals(schemas.length, 2);*
>>>>>>>>
>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> -----------------------------------------------------------------------------------------------------------------
>>>>>>>>> build 18-Apr-2012 17:01:13 Failed tests:
>>>>>>>>> build 18-Apr-2012 17:01:13  
>>>>>>>>> testAddSchema(org.wso2.carbon.registry.governance.api.test.SchemaTestCase):
>>>>>>>>> expected:<3> but was:<2>
>>>>>>>>> build 18-Apr-2012 17:01:13
>>>>>>>>> build 18-Apr-2012 17:01:13 Tests run: 233, Failures: 1, Errors:
>>>>>>>>> 0, Skipped: 0
>>>>>>>>>
>>>>>>>>> -----------------------------------------------------------------------------------------------------------------
>>>>>>>>>
>>>>>>>>> Test case:
>>>>>>>>>
>>>>>>>>> -----------------------------------------------------------------------------------------------------------------
>>>>>>>>> Schema[] schemas = schemaManager.findSchemas(new SchemaFilter() {
>>>>>>>>>             public boolean matches(Schema schema) throws
>>>>>>>>> GovernanceException {
>>>>>>>>>                 if (schema.getAttribute("version").equals("0.01"))
>>>>>>>>> {
>>>>>>>>>                     return true;
>>>>>>>>>                 }
>>>>>>>>>                 return false;
>>>>>>>>>             }
>>>>>>>>>         });
>>>>>>>>>         *assertEquals(2, schemas.length);*
>>>>>>>>>         assertEquals(newSchema.getId(), schemas[0].getId());
>>>>>>>>>
>>>>>>>>> -----------------------------------------------------------------------------------------------------------------
>>>>>>>>>
>>>>>>>>> Regards,
>>>>>>>>>
>>>>>>>>> On Thu, Apr 19, 2012 at 10:56 AM, Subash Chaturanga <
>>>>>>>>> sub...@wso2.com> wrote:
>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Thu, Apr 19, 2012 at 10:41 AM, Subash Chaturanga <
>>>>>>>>>> sub...@wso2.com> wrote:
>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Thu, Apr 19, 2012 at 10:19 AM, Ishan Jayawardena <
>>>>>>>>>>> is...@wso2.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Hi, please have a look at this error. Attached Log.
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Hi,  already saw this on bamboo logs and working on it, this is
>>>>>>>>>>> not only due to a testng failure. But product-governance-services 
>>>>>>>>>>> also
>>>>>>>>>>> fails.
>>>>>>>>>>>
>>>>>>>>>>> - governance stratos fails.
>>>>>>>>>>>
>>>>>>>>>> There was patch for this fix, and not yet commited. I think
>>>>>>>>>> Dimuthu is looking in to this to commit the patch.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> - 1 test failure and I am locally trying to reproduce this.(This
>>>>>>>>>>> was a randomly failing test and we intentionally add this(+ two 
>>>>>>>>>>> other
>>>>>>>>>>> tests) to see the behavior of this, because we couldn't reproduce 
>>>>>>>>>>> this
>>>>>>>>>>> locally in anyway).
>>>>>>>>>>>
>>>>>>>>>>> Excluded SchemaTest until get fixed.
>>>>>>>>>>
>>>>>>>>>>>  Thanks
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>> Thanks,
>>>>>>>>>>>> Ishan.
>>>>>>>>>>>> --
>>>>>>>>>>>> Ishan Jayawardena
>>>>>>>>>>>> Software Engineer
>>>>>>>>>>>> Integration Technologies Team
>>>>>>>>>>>> WSO2, Inc. http://wso2.com/
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>> Dev mailing list
>>>>>>>>>>>> Dev@wso2.org
>>>>>>>>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>>
>>>>>>>>>>> Subash Chaturanga
>>>>>>>>>>> Software Engineer
>>>>>>>>>>> WSO2 Inc. http://wso2.com
>>>>>>>>>>>
>>>>>>>>>>> email - sub...@wso2.com
>>>>>>>>>>> phone - 077 2225922
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>>
>>>>>>>>>> Subash Chaturanga
>>>>>>>>>> Software Engineer
>>>>>>>>>> WSO2 Inc. http://wso2.com
>>>>>>>>>>
>>>>>>>>>> email - sub...@wso2.com
>>>>>>>>>> phone - 077 2225922
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> _______________________________________________
>>>>>>>>>> Dev mailing list
>>>>>>>>>> Dev@wso2.org
>>>>>>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Vijitha Kumara
>>>>>>>>> Senior Software Engineer; WSO2, Inc.;  http://wso2.com/
>>>>>>>>> email: viji...@wso2.com
>>>>>>>>>
>>>>>>>>> Lean . Enterprise . Middleware
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> Dev mailing list
>>>>>>>>> Dev@wso2.org
>>>>>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> *Afkham Azeez*
>>>>>>>> Director of Architecture; WSO2, Inc.; http://wso2.com
>>>>>>>> Member; Apache Software Foundation; http://www.apache.org/
>>>>>>>> * <http://www.apache.org/>**
>>>>>>>> email: **az...@wso2.com* <az...@wso2.com>* cell: +94 77 3320919
>>>>>>>> blog: **http://blog.afkham.org* <http://blog.afkham.org>*
>>>>>>>> twitter: 
>>>>>>>> **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez>
>>>>>>>> *
>>>>>>>> linked-in: **http://lk.linkedin.com/in/afkhamazeez*
>>>>>>>>
>>>>>>>> *
>>>>>>>> *
>>>>>>>> *Lean . Enterprise . Middleware*
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Vijitha Kumara
>>>>>>> Senior Software Engineer; WSO2, Inc.;  http://wso2.com/
>>>>>>> email: viji...@wso2.com
>>>>>>>
>>>>>>> Lean . Enterprise . Middleware
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> *Afkham Azeez*
>>>>>> Director of Architecture; WSO2, Inc.; http://wso2.com
>>>>>> Member; Apache Software Foundation; http://www.apache.org/
>>>>>> * <http://www.apache.org/>**
>>>>>> email: **az...@wso2.com* <az...@wso2.com>* cell: +94 77 3320919
>>>>>> blog: **http://blog.afkham.org* <http://blog.afkham.org>*
>>>>>> twitter: 
>>>>>> **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez>
>>>>>> *
>>>>>> linked-in: **http://lk.linkedin.com/in/afkhamazeez*
>>>>>> *
>>>>>> *
>>>>>> *Lean . Enterprise . Middleware*
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Dev mailing list
>>>>>> Dev@wso2.org
>>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>>
>>>>> Subash Chaturanga
>>>>> Software Engineer
>>>>> WSO2 Inc. http://wso2.com
>>>>>
>>>>> email - sub...@wso2.com
>>>>> phone - 077 2225922
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Subash Chaturanga
>>>> Software Engineer
>>>> WSO2 Inc. http://wso2.com
>>>>
>>>> email - sub...@wso2.com
>>>> phone - 077 2225922
>>>>
>>>>
>>>
>>>
>>> --
>>>
>>> Subash Chaturanga
>>> Software Engineer
>>> WSO2 Inc. http://wso2.com
>>>
>>> email - sub...@wso2.com
>>> phone - 077 2225922
>>>
>>>
>>
>>
>> --
>>
>> Subash Chaturanga
>> Software Engineer
>> WSO2 Inc. http://wso2.com
>>
>> email - sub...@wso2.com
>> phone - 077 2225922
>>
>>
>
>
> --
> *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://linkedin.com/in/senakafernando
>
> *
> Lean . Enterprise . Middleware
>
>


-- 

Subash Chaturanga
Software Engineer
WSO2 Inc. http://wso2.com

email - sub...@wso2.com
phone - 077 2225922
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to