harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lvj...@apache.org
Subject svn commit: r648202 - in /harmony/enhanced/jdktools/branches/java6/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp: ReferenceType/ConstantPoolTest.java ThreadReference/ForceEarlyReturn002Test.java
Date Tue, 15 Apr 2008 09:59:18 GMT
Author: lvjing
Date: Tue Apr 15 02:59:14 2008
New Revision: 648202

URL: http://svn.apache.org/viewvc?rev=648202&view=rev
Log:
Apply patch for HARMONY-5730,[jdktools][jdwp6] Improve the efficiency of test cases of ForceEarlyReturn
Command for Java 6

Modified:
    harmony/enhanced/jdktools/branches/java6/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/ReferenceType/ConstantPoolTest.java
    harmony/enhanced/jdktools/branches/java6/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/ThreadReference/ForceEarlyReturn002Test.java

Modified: harmony/enhanced/jdktools/branches/java6/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/ReferenceType/ConstantPoolTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/branches/java6/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/ReferenceType/ConstantPoolTest.java?rev=648202&r1=648201&r2=648202&view=diff
==============================================================================
--- harmony/enhanced/jdktools/branches/java6/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/ReferenceType/ConstantPoolTest.java
(original)
+++ harmony/enhanced/jdktools/branches/java6/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/ReferenceType/ConstantPoolTest.java
Tue Apr 15 02:59:14 2008
@@ -102,10 +102,12 @@
         
         try {
             BufferedInputStream in = new BufferedInputStream(new FileInputStream(debuggeeClass));
-            int count = -1;
-            while(count != 0){
-                count = in.read(bytes,0,length);
-                count = length - count;
+            int count = 0;
+            int index = 0;
+            while(length != 0){
+                count = in.read(bytes,index,length);
+                index += count;
+                length -= count;
             }
         } catch (Exception e) {
             printErrorAndFail(thisCommandName + "has error in reading target class file!");

Modified: harmony/enhanced/jdktools/branches/java6/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/ThreadReference/ForceEarlyReturn002Test.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/branches/java6/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/ThreadReference/ForceEarlyReturn002Test.java?rev=648202&r1=648201&r2=648202&view=diff
==============================================================================
--- harmony/enhanced/jdktools/branches/java6/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/ThreadReference/ForceEarlyReturn002Test.java
(original)
+++ harmony/enhanced/jdktools/branches/java6/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/ThreadReference/ForceEarlyReturn002Test.java
Tue Apr 15 02:59:14 2008
@@ -18,8 +18,11 @@
 
 package org.apache.harmony.jpda.tests.jdwp.ThreadReference;
 
+import org.apache.harmony.jpda.tests.framework.Breakpoint;
 import org.apache.harmony.jpda.tests.framework.jdwp.CommandPacket;
 import org.apache.harmony.jpda.tests.framework.jdwp.JDWPCommands;
+import org.apache.harmony.jpda.tests.framework.jdwp.JDWPConstants;
+import org.apache.harmony.jpda.tests.framework.jdwp.ParsedEvent;
 import org.apache.harmony.jpda.tests.framework.jdwp.ReplyPacket;
 import org.apache.harmony.jpda.tests.framework.jdwp.Value;
 import org.apache.harmony.jpda.tests.jdwp.share.JDWPSyncTestCase;
@@ -67,7 +70,7 @@
         // Tell debuggee to start a thread named THREAD_LONG
         synchronizer.sendMessage(ForceEarlyReturnDebuggee.THREAD_LONG);
 
-        // Wait until the func_Long is processing.
+        // The thread is ready
         synchronizer.receiveMessage(JPDADebuggeeSynchronizer.SGNL_READY);
 
         // Getting ID of the tested thread
@@ -78,10 +81,6 @@
                 .getThreadID(ForceEarlyReturnDebuggee.THREAD_LONG);
         logWriter.println("==> Get testedThreadID is" + testedThreadID);
 
-        // Suspend the VM before perform command
-        logWriter.println("==> testedThreadID = " + testedThreadID);
-        logWriter.println("==> suspend testedThread...");
-        debuggeeWrapper.vmMirror.suspendThread(testedThreadID);
 
         // Compose the ForceEarlyReturn command
         CommandPacket forceEarlyReturnPacket = new CommandPacket(



Mime
View raw message