This is the mail archive of the mauve-discuss@sourceware.org mailing list for the Mauve project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Possible Mauve bug.


The attached test case specifically fails when running as part of the Mauve under Sun's jre 1.4.2 but succeeds if executed as standalone program under the mentioned Sun's jre. GNU Classpath implementation passes this test regardless if it is executed standalone or as part of the Mauve.

The test case is derived from the prepared Mauve tests for the org.omg.PortableInterceptor. I am not sure if I can commit the test set that totally fails under Sun's jre due, I think, Mauve related reason. This set runs perfectly under JUnit.

As I cannot look into the Sun's sources, it is very difficult for me to find the exact reason, why the test fails. All I can do is guess looking at my own code that is working. The CORBA implementation must call Class.forName(String) somewhere; probably that call fails?

Probably the problem could be easier solved by somebody who knows Mauve on much better level "I wrote it" (I did not participate in Mauve development).

Regards

Audrius

// Tags: JDK1.4

package gnu.testlet.org.omg.PortableInterceptor.Interceptor;

import gnu.testlet.TestHarness;
import gnu.testlet.Testlet;

import org.omg.CORBA.LocalObject;
import org.omg.CORBA.ORB;
import org.omg.PortableInterceptor.ORBInitInfo;
import org.omg.PortableInterceptor.ORBInitializer;

import java.util.Properties;

public class mt extends LocalObject implements Testlet, ORBInitializer
{
  static boolean was_pre_init;
  static boolean was_post_init;

  public void test(TestHarness harness)
  {
    try
      {
        Properties initialisers = new Properties();
        initialisers.setProperty(
          "org.omg.PortableInterceptor.ORBInitializerClass." +
          getClass().getName(),
          ""
        );

        // Create and initialize the ORB
        ORB orb = org.omg.CORBA.ORB.init(new String[ 0 ], initialisers);
      }
    catch (Exception e)
      {
        e.printStackTrace();
      }
    if (!was_pre_init || !was_post_init)
      System.out.println("mt:TEST FAILED");
    else
      System.out.println("mt:Test passed");
  }

  public void pre_init(ORBInitInfo parm1)
  {
    System.out.println("mt:Pre init called");
    was_pre_init = true;
  }

  public void post_init(ORBInitInfo parm1)
  {
    System.out.println("mt:Post init called");
    was_post_init = true;
  }

  public static void main(String[] args)
  {
    // Run as standalone application.
    new mt().test(null);
  }
}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]