[threeten-dev] TestNG for JTreg

Xueming Shen xueming.shen at oracle.com
Thu Nov 22 10:17:20 PST 2012


On 11/22/12 3:00 AM, Stephen Colebourne wrote:
> On 22 November 2012 06:43, Xueming Shen <xueming.shen at oracle.com> wrote:
>> http://cr.openjdk.java.net/~sherman/jdk8_threeten/test.javax.time
>>
>> This is the current "working" version, which puts all tests under
>> <jdk>/test/javax/time and categorizes the tests into "test", the
>> "normal" unit tests, and "tck" the tck tests. The tests for package-private
>> classes/interfaces (mainly the "format" packages) will need to be updated.
>>
>> The "alternative", which is what Stephen is asking, is
>>
>> http://cr.openjdk.java.net/~sherman/jdk8_threeten/test.javax.time2,
> Clearly I prefer the second. I believe that non-TCK tests should have
> the ability to test the package-scope API.
>
> However, I do note from the OpenJDK source tree that this isn't how
> the current tests work. Obviously OpenJDK has a different
> heritage/style to the rest of the world...

The difference is that the test of OpenJDK tests the jdk/jre itself 
while the
test of the "rest" of the world tests anything other than the jdk/jre 
runtime.
While testing the jdk/jre runtime, those jdk/jre classes (being tested) are
loaded from the boot classpath and the "anything else", those tests, are 
from
their own classloader. I need double check with  the classloader expert, 
though
I believe it would be an issue if these tests still have package-private 
access
to those classes from the bootclasspath. Even if it's possible to hack 
the test
harness to run those tests against a "separate"(not from the bootclasspath)
set of same targeted classes (those javax.time... in our cases), 
arguably you
are not testing the classes in the targeted jdk/jre runtime.

-Sherman


>
> I also do not see any distinction in OpenJDK tests between TCK and
> non-TCK. How is that generally done?
>
> Stephen



More information about the threeten-dev mailing list