javacommons/utils/tsrc/javasrc/com/nokia/mj/impl/utils/concurrent/ConcurrentTests.java
branchRCL_3
changeset 83 26b2b12093af
parent 77 7cee158cb8cd
--- a/javacommons/utils/tsrc/javasrc/com/nokia/mj/impl/utils/concurrent/ConcurrentTests.java	Wed Sep 15 12:05:25 2010 +0300
+++ b/javacommons/utils/tsrc/javasrc/com/nokia/mj/impl/utils/concurrent/ConcurrentTests.java	Wed Oct 13 14:23:59 2010 +0300
@@ -21,7 +21,8 @@
 import java.util.Enumeration;
 import java.util.Vector;
 
-import com.nokia.mj.impl.rt.test.UnitTestSuiteCreator;
+import com.nokia.mj.impl.installer.utils.InstallerMain;
+import com.nokia.mj.impl.utils.DebugUtils;
 
 import j2meunit.framework.Test;
 import j2meunit.framework.TestCase;
@@ -31,7 +32,7 @@
 /**
  * BufferedReader unit tests.
  */
-public class ConcurrentTests extends TestCase implements UnitTestSuiteCreator
+public class ConcurrentTests extends TestCase implements InstallerMain
 {
     private int mMaxThreadId;
     private int mReleaseThreadId;
@@ -41,7 +42,7 @@
     private Object mLockEnd;
 
     // Begin j2meunit test framework setup
-    public TestSuite createTestSuite(String[] args)
+    public void installerMain(String[] args)
     {
         createDumperThread(false);
         TestSuite suite = new TestSuite(this.getClass().getName());
@@ -122,7 +123,9 @@
             }
         }));
 
-        return suite;
+
+
+        com.nokia.mj.impl.utils.OmjTestRunner.run(suite);
 
     }
 
@@ -139,8 +142,7 @@
     {
         if (doCreate)
         {
-            new Thread(new Runnable()
-            {
+            new Thread(new Runnable(){
                 public void run()
                 {
                     threadSleep(5000);
@@ -187,8 +189,8 @@
     {
         if (doTrace)
         {
-            //System.out.println(str);
-            mTrace.addElement(str);
+        //System.out.println(str);
+        mTrace.addElement(str);
         }
     }
 
@@ -248,7 +250,7 @@
 
         try
         {
-
+            
             testLock(true);
         }
         catch (Throwable t)
@@ -267,7 +269,7 @@
 
         try
         {
-
+            
             testLock(true);
         }
         catch (Throwable t)
@@ -286,7 +288,7 @@
 
         try
         {
-
+            
             testLock(false);
         }
         catch (Throwable t)
@@ -305,7 +307,7 @@
 
         try
         {
-
+            
             testLock(false);
         }
         catch (Throwable t)
@@ -357,13 +359,13 @@
     {
         private int mId;
         private boolean mCheck;
-
+        
         private LockTestThread(int id, boolean check)
         {
             mId = id;
             mCheck = check;
         }
-        public void run()
+        public void run() 
         {
             threadSleep(20);
             trace("run: "+mId);
@@ -387,7 +389,7 @@
             trace("Got lock: "+mId);
             if (mCheck)
             {
-                String errorTxt = "Incorrect release order. mId: "+ mId +
+                String errorTxt = "Incorrect release order. mId: "+ mId + 
                                   ", next: " +mNextReleasedThreadId;
                 assertTrue(errorTxt, mNextReleasedThreadId == mId);
             }
@@ -498,12 +500,12 @@
     private class ConditionTestThread extends Thread
     {
         private int mId;
-
+        
         private ConditionTestThread(int id)
         {
             mId = id;
         }
-        public void run()
+        public void run() 
         {
             threadSleep(20);
             trace("run: "+mId);