[jboss-cvs] JBossAS SVN: r61635 - trunk/testsuite/src/main/org/jboss/test/util/test.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Mar 23 07:29:06 EDT 2007
Author: dimitris at jboss.org
Date: 2007-03-23 07:29:06 -0400 (Fri, 23 Mar 2007)
New Revision: 61635
Modified:
trunk/testsuite/src/main/org/jboss/test/util/test/ThreadPoolRunnableUnitTestCase.java
Log:
JBAS-4160, add some logging, improve the timing.
Modified: trunk/testsuite/src/main/org/jboss/test/util/test/ThreadPoolRunnableUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/util/test/ThreadPoolRunnableUnitTestCase.java 2007-03-23 11:27:38 UTC (rev 61634)
+++ trunk/testsuite/src/main/org/jboss/test/util/test/ThreadPoolRunnableUnitTestCase.java 2007-03-23 11:29:06 UTC (rev 61635)
@@ -1,24 +1,24 @@
/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.test.util.test;
import java.util.Arrays;
@@ -77,6 +77,7 @@
*/
public void testBasic() throws Exception
{
+ log.debug("testBasic");
BasicThreadPool pool = new BasicThreadPool();
try
{
@@ -96,6 +97,7 @@
*/
public void testMultipleBasic() throws Exception
{
+ log.debug("testMultipleBasic");
BasicThreadPool pool = new BasicThreadPool();
try
{
@@ -117,6 +119,7 @@
*/
public void testSimplePooling() throws Exception
{
+ log.debug("testSimplePooling");
BasicThreadPool pool = new BasicThreadPool();
pool.setMaximumPoolSize(1);
try
@@ -138,6 +141,7 @@
*/
public void testMultiplePooling() throws Exception
{
+ log.debug("testMultiplePooling");
BasicThreadPool pool = new BasicThreadPool();
try
{
@@ -160,6 +164,7 @@
*/
public void testMaximumPool() throws Exception
{
+ log.debug("testMaximumPool");
BasicThreadPool pool = new BasicThreadPool();
pool.setMaximumPoolSize(1);
try
@@ -184,6 +189,7 @@
*/
public void testMaximumQueue() throws Exception
{
+ log.debug("testMaximumQueue");
BasicThreadPool pool = new BasicThreadPool();
pool.setMaximumQueueSize(1);
pool.setMaximumPoolSize(1);
@@ -219,6 +225,7 @@
*/
public void testRunnableTimeout() throws Exception
{
+ log.debug("testRunnableTimeout");
BasicThreadPool pool = new BasicThreadPool();
pool.setMaximumQueueSize(1);
pool.setMaximumPoolSize(1);
@@ -242,16 +249,17 @@
*/
public void testRunnableTimeoutWithSpinLoop() throws Exception
{
+ log.debug("testRunnableTimeoutWithSpinLoop");
BasicThreadPool pool = new BasicThreadPool();
pool.setMaximumQueueSize(1);
pool.setMaximumPoolSize(1);
try
{
TestRunnable test = new TestRunnable(HOLD_START, "test1", Long.MAX_VALUE);
- pool.run(test, 0, 10*1000);
+ pool.run(test, 0, 8*1000);
waitStarted(1);
releaseStarted("test1");
- Thread.sleep(11*1000);
+ Thread.sleep(12*1000);
// Run another task to validate the previous thread has been cleared
pool.run(new TestRunnable(BASIC, "test2"));
waitStarted(1);
@@ -270,6 +278,7 @@
*/
public void testRunnableTimeoutWithSpinLoop2() throws Exception
{
+ log.debug("testRunnableTimeoutWithSpinLoop2");
BasicThreadPool pool = new BasicThreadPool();
pool.setMaximumQueueSize(1);
pool.setMaximumPoolSize(1);
More information about the jboss-cvs-commits
mailing list