Related to the profileservice tests on win32, I started adding an hdscanner/profileservice
repository mock up. However, I see that there are some tests that don't validate file
deletion when run on win32, for example this FileVFSUnitTestCase test where the assertion
is 'tmp.delete() || isWindowsOS()':
| public void testFileExists()
| throws Exception
| {
| File tmpRoot = File.createTempFile("vfs", ".root");
| tmpRoot.delete();
| tmpRoot.mkdir();
| File tmp = File.createTempFile("testFileExists", null, tmpRoot);
| log.info("+++ testFileExists, tmp="+tmp.getCanonicalPath());
|
| URL rootURL = tmpRoot.toURL();
| VFS vfs = VFS.getVFS(rootURL);
| VirtualFile tmpVF = vfs.findChild(tmp.getName());
| assertTrue(tmpVF.getPathName()+".exists()", tmpVF.exists());
| assertTrue("tmp.delete()", tmp.delete() || isWindowsOS());
| assertFalse(tmpVF.getPathName()+".exists()", tmpVF.exists() &&
isWindowsOS() == false);
| assertTrue(tmpRoot+".delete()", tmpRoot.delete() || isWindowsOS());
| }
|
What is the point of not checking the delete return value under win32?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4159578#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...