Charles, Is it possible to rewrite Hadoop tests to avoid using sun.* packages?
On Wed, Jul 28, 2010 at 9:49 AM, Charles Lee <littlee1...@gmail.com> wrote: > Hi guys, > > I am running hadoop unit testing and trying to fix some failures for a > while. Combining two great projects excites me a lot. Here is my current > status: > > Env: > Harmony 6 (requires by hadoop) + linux 32 platform > > Using: run-test-core > Whole test cases: 757 > Failures: 8 > Errors: 25 > > To get this result, some code need to be changed in hadoop-common [0], some > jiras should be commited [1] and some modules I borrowed from RI [2]. > > [0] > a. UserGroupInformation.java should be changed, because hadoop hard coding > the its login module, using com.sun.security things. > b. reduce the failure trying times from 45 to 2. Because junit testcase will > be timeout if we are trying 45 times. (ri also failed on this) > > [1] > a. HARMONY-6529 </jira/browse/HARMONY-6529>. hadoop is required jdk1.6, > patch available. > b. HARMONY-6561 </jira/browse/HARMONY-6561> Fixed > c. HARMONY-6569 </jira/browse/HARMONY-6569> Fixed > d. HARMONY-6571 </jira/browse/HARMONY-6571> JNDI things > e. HARMONY-6575 </jira/browse/HARMONY-6575> It may be a drlvm, in my todo > list. > f. HARMONY-6580 </jira/browse/HARMONY-6580>, > HARMONY-6605</jira/browse/HARMONY-6605> > Fixed > g. HARMONY-6587 </jira/browse/HARMONY-6587> Fixed > h. HARMONY-6604 </jira/browse/HARMONY-6604> Behavior different between ri > and harmony > > [2] > a. add tools.jar, which in the harmony jdk/lib, in the > bootclasspath.properties. Ant try to find the com.sun.tools.javac.Main to > determine whether JAVA_HOME is point to a jre or a jdk. This jar is not from > ri, but we may need to change our layout a little bit. > b. add ecj.jar to the $ANT_HOME/lib or add it in the > bootclasspath.properties. > c. javax.annotation.processing, javax.lang.model, javax.tools, these package > borrow from RI, which is missing in harmony java6. > d. sun.security.krb5, this package borrow from RI. Do we have couterpart in > harmony? I have not found one. > e. sun.misc.HexDumpEncoder, this borrow from RI. Missing in harmony java6. > f. sun.reflect.ReflectionFactory, this borrow from RI. Missing in harmony > java6. [3] > g. > sun/misc/Unsafe.defineClass(Ljava/lang/String;[BIILjava/lang/ClassLoader;Ljava/security/ProtectionDomain;)Ljava/lang/Class; > This method is not defined in our Unsafe. [3] > h. javadoc and doclet package is borrowed from RI. Missing in harmony java6. > Is is one of our GSoC now? > > [3] > f and g in [2] is raised from a popular project: mockito. Mockito is using > another project: objenesis. Now g is at the top of my todo list. > > -- > Yours sincerely, > Charles Lee >