VirtualFileSystem { protected VirtualFileSystemRoot getRoot() { return _root; } private  VirtualFileSystem(); static String getLast(String path); static VirtualFileSystem getVirtualFileSystem(); static String stripLast(String path); static String fixPath(String path); static final String dirName; static final String fileSystemPath; static final String separator; }
@Test public void testMemory() { System.out.println("Stress test, we can scale now with lots of small files"); for (int x = 0; x < 3; x++) { VirtualFileSystemDirectory walker1; try { vfs.getRoot().createDirectory(String.valueOf(x), "test", "test"); } catch (FileExistsException ignored) { } try { walker1 = (VirtualFileSystemDirectory) vfs.getRoot().getInodeByName(String.valueOf(x)); } catch (FileNotFoundException e) { throw new RuntimeException("this can't be good1"); } for (int y = 0; y < 3; y++) { VirtualFileSystemDirectory walker2; try { walker1.createDirectory(String.valueOf(y), "test2", "test2"); } catch (FileExistsException ignored) { } try { walker2 = (VirtualFileSystemDirectory) walker1.getInodeByName(String.valueOf(y)); } catch (FileNotFoundException e) { throw new RuntimeException("this can't be good2"); } for (int z = 0; z < 3; z++) { try { walker2.createFile(String.valueOf(z), "test3", "test3", "testSlave"); } catch (FileExistsException ignored) { } } } } System.out.println("Done testing memory"); }