java: Remove old test file if one was left around.

If a test.img file was left over from a previous run, then it
would cause the subsequent test to fail.  Therefore remove any
old test.img file.
This commit is contained in:
Richard W.M. Jones
2011-03-02 05:10:31 +00:00
parent db98ac041e
commit 80aad70995

View File

@@ -24,6 +24,10 @@ public class GuestFS010Basic
public static void main (String[] argv)
{
try {
// Delete any previous test file if one was left around.
File old = new File ("test.img");
old.delete ();
RandomAccessFile f = new RandomAccessFile ("test.img", "rw");
f.setLength (500 * 1024 * 1024);
f.close ();