avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From co...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/thread/src/test/org/apache/avalon/excalibur/thread/impl/test DefaultThreadPoolTestCase.java
Date Wed, 08 May 2002 11:02:34 GMT
colus       02/05/08 04:02:34

  Added:       thread/src/test/org/apache/avalon/excalibur/thread/impl/test
                        DefaultThreadPoolTestCase.java
  Log:
  TestCase for DefaultThreadPool.
  
  Revision  Changes    Path
  1.1                  jakarta-avalon-excalibur/thread/src/test/org/apache/avalon/excalibur/thread/impl/test/DefaultThreadPoolTestCase.java
  
  Index: DefaultThreadPoolTestCase.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included with this distribution in
   * the LICENSE.txt file.
   */
  package org.apache.avalon.excalibur.thread.impl.test;
  
  import org.apache.avalon.framework.logger.ConsoleLogger;
  import org.apache.avalon.excalibur.thread.ThreadPool;
  import org.apache.avalon.excalibur.thread.impl.DefaultThreadPool;
  import org.apache.excalibur.threadcontext.ThreadContext;
  import junit.framework.TestCase;
  
  /**
   * TestCase for DefaultThreadPool.
   *
   * @author <a href="mailto:colus@apache.org">Eung-ju Park</a>
   */
  public class DefaultThreadPoolTestCase
      extends TestCase
  {
      public DefaultThreadPoolTestCase( final String name )
      {
          super( name );
      }
  
      public void testWithThreadContext()
          throws Exception
      {
          final ThreadContext threadContext = ThreadContext.getThreadContext();
          final DefaultThreadPool pool = new DefaultThreadPool( "default", 10, threadContext
);
          pool.setDaemon( false );
          pool.enableLogging( new ConsoleLogger() );
          pool.execute( new DummyRunnable() );
      }
  
      private static class DummyRunnable
          implements Runnable
      {
          public void run()
          {
          }
      }
  }
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message