@Test public void testBug11896() throws Exception { boolean test = true; if (FileUtilities.findProgInPath("mkfifo") == null) { System.out.println("Error: mkfifo not found in PATH !\n"); test = false; } if (test) { RuntimeEnvironment env = RuntimeEnvironment.getInstance(); env.setSourceRoot(repository.getSourceRoot()); env.setDataRoot(repository.getDataRoot()); Executor executor; executor = new Executor(new String[]{"mkdir", "-p", repository.getSourceRoot() + "/testBug11896"}); executor.exec(true); executor = new Executor(new String[]{"mkfifo", repository.getSourceRoot() + "/testBug11896/FIFO"}); executor.exec(true); Project project = new Project("testBug11896"); project.setPath("/testBug11896"); IndexDatabase idb = new IndexDatabase(project); assertNotNull(idb); MyIndexChangeListener listener = new MyIndexChangeListener(); idb.addIndexChangedListener(listener); System.out.println("Trying to index a special file - FIFO in this case."); idb.update(); assertEquals(0, listener.files.size()); } else { System.out.println("Skipping test for bug 11896. Could not find a mkfifo in path."); } }
public static Indexer getInstance() { return index; }
Indexer { public static Indexer getInstance() { return index; } }
Indexer { public static Indexer getInstance() { return index; } private  Indexer(); }
Indexer { public static Indexer getInstance() { return index; } private  Indexer(); static Indexer getInstance(); @SuppressWarnings("PMD.UseStringBufferForStringAppends") static void main(String[] argv); static String[] parseOptions(String[] argv); static void writeConfigToFile(RuntimeEnvironment env, String filename); void prepareIndexer(RuntimeEnvironment env,
                               boolean searchRepositories,
                               boolean addProjects,
                               boolean createDict,
                               List<String> subFiles,
                               List<String> repositories); @SuppressWarnings("PMD.SimplifyStartsWith") void prepareIndexer(RuntimeEnvironment env,
            Set<String> searchPaths,
            boolean addProjects,
            boolean createDict,
            boolean createHistoryCache,
            List<String> subFiles,
            List<String> repositories); void doIndexerExecution(final boolean update, List<String> subFiles,
        IndexChangedListener progress); void refreshSearcherManagers(RuntimeEnvironment env, List<String> projects, String host); void sendToConfigHost(RuntimeEnvironment env, String host); }
Indexer { public static Indexer getInstance() { return index; } private  Indexer(); static Indexer getInstance(); @SuppressWarnings("PMD.UseStringBufferForStringAppends") static void main(String[] argv); static String[] parseOptions(String[] argv); static void writeConfigToFile(RuntimeEnvironment env, String filename); void prepareIndexer(RuntimeEnvironment env,
                               boolean searchRepositories,
                               boolean addProjects,
                               boolean createDict,
                               List<String> subFiles,
                               List<String> repositories); @SuppressWarnings("PMD.SimplifyStartsWith") void prepareIndexer(RuntimeEnvironment env,
            Set<String> searchPaths,
            boolean addProjects,
            boolean createDict,
            boolean createHistoryCache,
            List<String> subFiles,
            List<String> repositories); void doIndexerExecution(final boolean update, List<String> subFiles,
        IndexChangedListener progress); void refreshSearcherManagers(RuntimeEnvironment env, List<String> projects, String host); void sendToConfigHost(RuntimeEnvironment env, String host); static final char PATH_SEPARATOR; static final String PATH_SEPARATOR_STRING; }