From: <tho...@us...> - 2011-01-09 15:38:40
|
Revision: 4068 http://bigdata.svn.sourceforge.net/bigdata/?rev=4068&view=rev Author: thompsonbry Date: 2011-01-09 15:38:34 +0000 (Sun, 09 Jan 2011) Log Message: ----------- test_transferAllFrom() is hanging under OS X. I have modified the unit test to detect the OS X platform and fail immediately rather than hanging while I get the JOURNAL_HA_BRANCH/QUADS_QUERY_BRANCH merge running. Modified Paths: -------------- branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/io/TestFileChannelUtility.java Modified: branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/io/TestFileChannelUtility.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/io/TestFileChannelUtility.java 2011-01-09 15:37:22 UTC (rev 4067) +++ branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/io/TestFileChannelUtility.java 2011-01-09 15:38:34 UTC (rev 4068) @@ -35,6 +35,8 @@ import java.nio.channels.FileChannel; import java.util.Random; +import org.apache.system.SystemUtil; + import com.bigdata.btree.BytesUtil; import com.bigdata.rawstore.Bytes; @@ -348,6 +350,13 @@ */ public void test_transferAllFrom() throws IOException { + if(SystemUtil.isOSX()) { + /* + * FIXME For some reason, this unit test is hanging under OS X. + */ + fail("Unit test hangs under OS X"); + } + final File sourceFile = File.createTempFile("TestFileChannelUtility", getName()); sourceFile.deleteOnExit(); @@ -358,7 +367,7 @@ final RandomAccessFile source = new RandomAccessFile(sourceFile, "rw"); - final RandomAccessFile target = new RandomAccessFile(sourceFile, "rw"); + final RandomAccessFile target = new RandomAccessFile(targetFile, "rw"); try { @@ -377,6 +386,7 @@ // write ground truth onto the file. FileChannelUtility.writeAll(source.getChannel(), ByteBuffer .wrap(expected), 0L/* pos */); + target.setLength(FILE_SIZE); // do a bunch of trials of random transfers. for(int trial=0; trial<1000; trial++) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |