[jboss-cvs] JBossAS SVN: r61634 - branches/Branch_4_2/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:27:39 EDT 2007


Author: dimitris at jboss.org
Date: 2007-03-23 07:27:38 -0400 (Fri, 23 Mar 2007)
New Revision: 61634

Modified:
   branches/Branch_4_2/testsuite/src/main/org/jboss/test/util/test/ThreadPoolRunnableUnitTestCase.java
Log:
JBAS-4160, add some logging, improve the timing.

Modified: branches/Branch_4_2/testsuite/src/main/org/jboss/test/util/test/ThreadPoolRunnableUnitTestCase.java
===================================================================
--- branches/Branch_4_2/testsuite/src/main/org/jboss/test/util/test/ThreadPoolRunnableUnitTestCase.java	2007-03-23 11:23:40 UTC (rev 61633)
+++ branches/Branch_4_2/testsuite/src/main/org/jboss/test/util/test/ThreadPoolRunnableUnitTestCase.java	2007-03-23 11:27:38 UTC (rev 61634)
@@ -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