|
From: <mar...@us...> - 2010-10-08 11:51:53
|
Revision: 3751
http://bigdata.svn.sourceforge.net/bigdata/?rev=3751&view=rev
Author: martyncutcher
Date: 2010-10-08 11:51:47 +0000 (Fri, 08 Oct 2010)
Log Message:
-----------
add debug output to isolate test failures
Modified Paths:
--------------
branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/io/writecache/WriteCacheService.java
branches/JOURNAL_HA_BRANCH/bigdata/src/test/com/bigdata/io/TestFileChannelUtility.java
branches/JOURNAL_HA_BRANCH/bigdata-rdf/src/test/com/bigdata/rdf/rules/TestDatabaseAtOnceClosure.java
Modified: branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/io/writecache/WriteCacheService.java
===================================================================
--- branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/io/writecache/WriteCacheService.java 2010-10-08 01:45:59 UTC (rev 3750)
+++ branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/io/writecache/WriteCacheService.java 2010-10-08 11:51:47 UTC (rev 3751)
@@ -1411,6 +1411,9 @@
log.trace("offset: " + offset + ", length: " + data.limit()
+ ", chk=" + chk + ", useChecksum=" + useChecksum);
}
+
+ if (!open)
+ throw new IllegalStateException("WriteCacheService has been closed");
if (offset < 0)
throw new IllegalArgumentException();
@@ -1907,6 +1910,8 @@
* Not open. Return [null] rather than throwing an exception per the
* contract for this implementation.
*/
+ log.warn("Reading from closed writeCacheService");
+
return null;
}
Modified: branches/JOURNAL_HA_BRANCH/bigdata/src/test/com/bigdata/io/TestFileChannelUtility.java
===================================================================
--- branches/JOURNAL_HA_BRANCH/bigdata/src/test/com/bigdata/io/TestFileChannelUtility.java 2010-10-08 01:45:59 UTC (rev 3750)
+++ branches/JOURNAL_HA_BRANCH/bigdata/src/test/com/bigdata/io/TestFileChannelUtility.java 2010-10-08 11:51:47 UTC (rev 3751)
@@ -358,7 +358,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 +377,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++) {
Modified: branches/JOURNAL_HA_BRANCH/bigdata-rdf/src/test/com/bigdata/rdf/rules/TestDatabaseAtOnceClosure.java
===================================================================
--- branches/JOURNAL_HA_BRANCH/bigdata-rdf/src/test/com/bigdata/rdf/rules/TestDatabaseAtOnceClosure.java 2010-10-08 01:45:59 UTC (rev 3750)
+++ branches/JOURNAL_HA_BRANCH/bigdata-rdf/src/test/com/bigdata/rdf/rules/TestDatabaseAtOnceClosure.java 2010-10-08 11:51:47 UTC (rev 3751)
@@ -619,12 +619,15 @@
String baseURI;
try {
+
+ System.out.println("looking for " + resource);
is = new FileInputStream(new File(resource));
baseURI = new File(resource).toURI().toString();
} catch (FileNotFoundException ex) {
+ System.out.println("no file, retrieving from resource");
is = getClass().getResourceAsStream(resource);
baseURI = getClass().getResource(resource).toURI()
.toString();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|