You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ru...@us.ibm.com on 2000/01/02 05:17:51 UTC

Eliminating sleeps from runtest...


On Wed, 15 Dec 1999 Costin.Manolache@eng.sun.com wrote:
> Both runtest.sh are bad, not because ksh but because of that
> sleep that can't be avoided and it's either too long or too
> short.

On Wed, 15 Dec 1999 James.Davidson@eng.sun.com wrote:
>Yep... I abhor having that sleep in there. The person that gets that out
>of there and finds me gets a drink of their choice bought for them. :)

The following appears to do the trick:

   package tests.shell;

   import org.apache.tomcat.shell.*;
   import org.apache.tools.moo.*;

   public class Test {

     public static void main(String[] mooArgs) {
       String tomcatArgs[] = new String[] {};
       Startup.main(tomcatArgs);
       Main.main(mooArgs);
       Shutdown.main(tomcatArgs);
     }
   }

Any objections to my incorporating this into the build and changing
runtest.[sh,bin] accordingly?

Suggestions for the package name and/or mechanisms to distinguish arguments
 destined for tomcat from those destined for moo?



Re: Eliminating sleeps from runtest...

Posted by Co...@eng.sun.com.
rubys@us.ibm.com wrote:

> On Wed, 15 Dec 1999 Costin.Manolache@eng.sun.com wrote:
> > Both runtest.sh are bad, not because ksh but because of that
> > sleep that can't be avoided and it's either too long or too
> > short.
>
> On Wed, 15 Dec 1999 James.Davidson@eng.sun.com wrote:
> >Yep... I abhor having that sleep in there. The person that gets that out
> >of there and finds me gets a drink of their choice bought for them. :)
>
> The following appears to do the trick:
>
>    package tests.shell;
>
>    import org.apache.tomcat.shell.*;
>    import org.apache.tools.moo.*;
>
>    public class Test {
>
>      public static void main(String[] mooArgs) {
>        String tomcatArgs[] = new String[] {};
>        Startup.main(tomcatArgs);
>        Main.main(mooArgs);
>        Shutdown.main(tomcatArgs);
>      }
>    }
>
> Any objections to my incorporating this into the build and changing
> runtest.[sh,bin] accordingly?
>
> Suggestions for the package name and/or mechanisms to distinguish arguments
>  destined for tomcat from those destined for moo?

IMHO, if you can build this into an ant taskdef we will get maximum
flexibility.

( like
 <tomcat-start dir="xxx" port="xxx" />
 <moo file="xxx" />
 <tomcat-stop />
)

Costin