public inbox for mauve-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Meskauskas Audrius <audriusa@bluewin.ch>
To: Nicolas Geoffray <nicolas.geoffray@menlina.com>,
	 mauve-discuss@sources.redhat.com
Subject: Re: tests with rmic!
Date: Tue, 18 Oct 2005 08:41:00 -0000	[thread overview]
Message-ID: <4354B543.1090404@bluewin.ch> (raw)
In-Reply-To: <4353DBB0.10807@menlina.com>

Hi, Nicolas,

Nice idea, great to have at least any java.rmi rests! The current 
testing situation with this package is deeply tragical, the coverage 
being plain zero. And it is possible to find random talks on the web 
like "how reliable they (GNU Classpath) RMI implementation is? Does it 
work?".

Any tests are very welcome.

I think it would be a good idea to write Mauve tests as the independent 
modules that run on a single virtual machine and does call external 
tools. The most of the current tests  are written this way. Here are 
several suggestions how to make an ordinary Mauve test that would not 
need to cross the boundaries of the current virtual machine to run:

1. Instead of starting three independent virtual machines (one for 
server, one for client and one for the naming service), you can just 
start three threads. When all cleanup problems, if any, will be 
restricted to the current run of the test suite.
2. Instead of invoking rmic from inside the Mauve test, run it once with 
the -keep key and just add the generated source code file to your path. 
Such test would be easier to debug.
3. When all threads are together and can share static variables, all 
cleanup is trivial (use try {}  finally { clean }).

Nicolas Geoffray wrote:

> Hi everyone,
>
> I found what might be a bug in gnu classpath and I would like to 
> commit a testlet in mauve. The thing is, my test involves compiling 
> with rmic and launching two gnu classpath jvms. I never commited in 
> mauve, but seeing other testlets, i didn't found ways to commit such a 
> test.
>
> I attached the files. This is how you launch the test:
>
> gcj -C Main.java
> gcj -C ReceiveObject.java
> gcj -C ReceiveObjectImpl.java
> rmic ReceiveObjectImpl
>
> rmiregistry &
> jamvm ReceiveObjectImpl &
> jamvm Main
>
>
> Any suggestions?
>
> Thanks,
> Nicolas
>
>------------------------------------------------------------------------
>
>import java.rmi.Naming;
>
>public class Main{
>
>  class Foo implements java.io.Serializable{}
>
>  class Bar implements java.io.Serializable{
>    Foo f = new Foo();
>  }
>    
>  public static void main(String[]args){
>
>    try{
>      Bar b = new Bar();
>      ReceiveObject ref = (ReceiveObject) Naming.lookup("rmi://localhost/ReceiveObject");
>      ref.receiveObject(b);
>    }catch(Exception e){
>      System.out.println("Error : " + e );
>    }
>  }
>}
>  
>
>------------------------------------------------------------------------
>
>import java.rmi.Remote;
>import java.rmi.RemoteException;
>
>public interface ReceiveObject extends Remote{
>  public Object receiveObject(Object unknown)
>		throws RemoteException;
>}
>  
>
>------------------------------------------------------------------------
>
>import java.rmi.*;
>import java.rmi.server.*;
>
>
>public class ReceiveObjectImpl extends UnicastRemoteObject implements ReceiveObject{
>
>  public ReceiveObjectImpl() throws RemoteException{
>  }
>
>  public Object receiveObject(Object unknown)
>    throws RemoteException{
>      System.out.println(unknown);
>      return null;
>    }
>
>  public static void main(String[] args){
>    try{
>      ReceiveObject ref = new ReceiveObjectImpl();
>      Naming.rebind("ReceiveObject", ref);
>    }catch(Exception e){
>      e.printStackTrace();
>    }
>  }
>}
>  
>

  parent reply	other threads:[~2005-10-18  8:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-17 17:13 tests with rmic Nicolas Geoffray
2005-10-18  2:37 ` Chris Abbey
2005-10-18  8:41 ` Meskauskas Audrius [this message]
2005-10-18 11:47   ` tests with rmic! Nicolas Geoffray
2005-10-18 18:10     ` tests with rmic Meskauskas Audrius

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4354B543.1090404@bluewin.ch \
    --to=audriusa@bluewin.ch \
    --cc=mauve-discuss@sources.redhat.com \
    --cc=nicolas.geoffray@menlina.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).