Apache JDO Project - TCK : Instanceof

This is Interesting: Free IT Magazines  
Home > Archive > Apache JDO Project > November 2005 > TCK : Instanceof





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author TCK : Instanceof
Andy Jefferson

2005-11-04, 7:45 am

The TCK test Instanceof has an error.
It defines 2 queries, yet only 1 set of expected results, ending up with
ArrayOutOfBoundsException when trying to get the expected result for the second part.

--
Andy

Michael Watzek

2005-11-04, 7:45 am

Hi Andy,

you are right! The second query seems to be a leftover from a previous
test. I'll fix that.

BTW: The expected query result is also wrong - should be emp3, emp4.

Thanks,
Michael
> The TCK test Instanceof has an error.
> It defines 2 queries, yet only 1 set of expected results, ending up with
> ArrayOutOfBoundsException when trying to get the expected result for the second part.
>
> --
> Andy



--
-------------------------------------------------------------------
Michael Watzek Tech@Spree Engineering GmbH
mailto:mwa.tech@spree.de Buelowstr. 66
Tel.: ++49/30/235 520 36 10783 Berlin - Germany
Fax.: ++49/30/217 520 12 http://www.spree.de/
-------------------------------------------------------------------

Michael Watzek

2005-11-04, 7:45 am

Hi Andy,

Michael convinced me that it makes sense to keep the second query.

There was a bug in the second query: The Java keyword 'import' was
specified in capitals. I fixed that also and adapted the expected result.

I checked in these changes (Revision 330795).

However, the second query fails. JPOX returns an empty result though pc
instances "emp3" and "emp4" are expected. Semantically the first query
and the second query are the same. Thus, this seems to be a JPOX issue.

Please have a look.

Regards,
Michael
> Hi Andy,
>
> you are right! The second query seems to be a leftover from a previous
> test. I'll fix that.
>
> BTW: The expected query result is also wrong - should be emp3, emp4.
>
> Thanks,
> Michael
>
>
>
>



--
-------------------------------------------------------------------
Michael Watzek Tech@Spree Engineering GmbH
mailto:mwa.tech@spree.de Buelowstr. 66
Tel.: ++49/30/235 520 36 10783 Berlin - Germany
Fax.: ++49/30/217 520 12 http://www.spree.de/
-------------------------------------------------------------------

Andy Jefferson

2005-11-04, 5:45 pm

Hi Michael,

thanks for your changes.
I don't understand why you changed the expected result to be "emp3, emp4". The
query is looking for Employees that have a mentor field that is PartTimeEmployee.
That means that it should return emp2 and emp3. The query is *not* which
employees *are* PartTimeEmployees. Or am I mistaken ?

Re: the JPOX status on instanceOf, what you have in last nights build won't give
you success since I've only just finished implementing it. Next nightly build
will pass the test, assuming you change the expected results back to what I think
they should be.

--
Andy

Michael Watzek

2005-11-04, 5:45 pm

Hi Andy,

> Hi Michael,
>
> thanks for your changes.
> I don't understand why you changed the expected result to be "emp3, emp4". The
> query is looking for Employees that have a mentor field that is PartTimeEmployee.
> That means that it should return emp2 and emp3. The query is *not* which
> employees *are* PartTimeEmployees. Or am I mistaken ?

You are completely right! Don't know why I thouht the query searches for
PartTimeEmployees?! I'll relax for ten minutes, smoke a cigarette, and
then fix it :-)

>
> Re: the JPOX status on instanceOf, what you have in last nights build won't give
> you success since I've only just finished implementing it. Next nightly build
> will pass the test, assuming you change the expected results back to what I think
> they should be.

That's fine.

Thanks,
Michael
>
> --
> Andy



--
-------------------------------------------------------------------
Michael Watzek Tech@Spree Engineering GmbH
mailto:mwa.tech@spree.de Buelowstr. 66
Tel.: ++49/30/235 520 36 10783 Berlin - Germany
Fax.: ++49/30/217 520 12 http://www.spree.de/
-------------------------------------------------------------------

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com