You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by co...@apache.org on 2002/05/08 13:02:34 UTC
cvs commit: jakarta-avalon-excalibur/thread/src/test/org/apache/avalon/excalibur/thread/impl/test DefaultThreadPoolTestCase.java
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: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>