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:[EMAIL PROTECTED]">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:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>