harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r416753 - /incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/SinkChannelTest.java
Date Fri, 23 Jun 2006 16:05:26 GMT
Author: tellison
Date: Fri Jun 23 09:05:26 2006
New Revision: 416753

URL: http://svn.apache.org/viewvc?rev=416753&view=rev
Log:
Improve test to avoid multi-threading through String#getBytes(String).

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/SinkChannelTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/SinkChannelTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/SinkChannelTest.java?rev=416753&r1=416752&r2=416753&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/SinkChannelTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/SinkChannelTest.java
Fri Jun 23 09:05:26 2006
@@ -104,14 +104,13 @@
 	public void test_write_LByteBuffer_mutliThread() throws IOException,
 	        InterruptedException {
         final int THREAD_NUM = 20;
+        final byte[] strbytes = "bytes".getBytes(ISO8859_1);
         Thread[] thread = new Thread[THREAD_NUM];
         for (int i = 0; i < THREAD_NUM; i++) {
             thread[i] = new Thread() {
                 public void run() {
                     try {
-                        sink
-                                .write(ByteBuffer.wrap("bytes"
-                                        .getBytes(ISO8859_1)));
+                        sink.write(ByteBuffer.wrap(strbytes));
                     } catch (IOException e) {
                         throw new RuntimeException(e);
                     }



Mime
View raw message