The patch generally looks good. A couple of comments/questions:
1) Do the original tests run with the client driver? It seems to me they don't, so I think it's okay to run the new test only in embedded mode.
2) I think it would be good to null out the fields when the test has completed (in tearDown()) so that the objects they reference can be garbage collected.
3) Instead of using File.deleteOnExit(), perhaps it's cleaner to delete the files explicitly in tearDown()? Seems that it would also remove the need for the runNo field.
4) I'm wondering if this code
+ new File(getSystemProperty("derby.system.home") +"foo",
+ makeStreamFilename("file")).getCanonicalPath()); // erroneous path
would be more robust if it was written as
new File(new File(getSystemProperty("derby.system.home"), "foo"), ...)
As it is now, I think it depends on derby.system.home ending with the path separator character.