I did that. Here's what I see happening.

With testClassPath() disabled, the test certainly progressed further until 
it threw, again, the same assertion error on IOException vs 
NonWritableChannelException expectation, which I thought I had already 
taken care of with my earlier edit.

So what is happening here is this.

1. If I use the original H2 code, I fail very early (much before 
testClassPath() call), with the call stack looking like this:

Thread [main] (Suspended (breakpoint at line 46 in AssertThrows$1)) 
AssertThrows$1.verify(Object, Throwable, Method, Object...) line: 46 
TestFileSystem$18(AssertThrows).<init>(ResultVerifier) line: 106 
TestFileSystem$18(AssertThrows).<init>(Class<Exception>) line: 30 
TestFileSystem$18.<init>(TestFileSystem, Class, FileChannel) line: 542 
TestFileSystem.testSimple(String) line: 542 
TestFileSystem.testFileSystem(String) line: 383 
TestFileSystem.test() line: 60 
TestFileSystem.main(String...) line: 55 
H2DatabaseTest.main(String[]) line: 40 


2. Then, I change the H2 code as follows:

TestFileSystem.testSimple() {
// ...
 // original: new AssertThrows(IOException.class) {
new AssertThrows(java.nio.channels.NonWritableChannelException.class) {
@Override
public void test() throws Exception {
    fc.truncate(10);
}
};


And I, of course, disable the call to testClassPath():

// testClasspath();


3. Then, the failure happens under the call to testFileSystem("memFS:"), 
with the call-stack looking like this:

Thread [main] (Suspended (breakpoint at line 46 in AssertThrows$1)) 
AssertThrows$1.verify(Object, Throwable, Method, Object...) line: 46 
TestFileSystem$18(AssertThrows).<init>(ResultVerifier) line: 106 
TestFileSystem$18(AssertThrows).<init>(Class<Exception>) line: 30 
TestFileSystem$18.<init>(TestFileSystem, Class, FileChannel) line: 544 
TestFileSystem.testSimple(String) line: 544 
TestFileSystem.testFileSystem(String) line: 383 
TestFileSystem.test() line: 84 
TestFileSystem.main(String...) line: 55 
H2DatabaseTest.main(String[]) line: 40 



So, I find it strange that my change in Step 2 above is not taking effect 
for memFS!


On Tuesday, April 29, 2014 2:32:17 PM UTC+5:30, Noel Grandin wrote:
>
> Just temporarily comment out the testClasspath() method code, it's not 
> strictly relevant to your filesystem changes. 
>
> On 2014-04-29 10:47, PN wrote: 
> > Thanks for spotting the cause. Since my file-system code will refuse to 
> run without bootclasspath/p, is there anything I 
> > can do on the H2 side to get it going? 
> > 
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to