Пример #1
0
 public WatchmanWatcher(
     String watchRoot,
     EventBus fileChangeEventBus,
     Clock clock,
     ObjectMapper objectMapper,
     ProcessExecutor processExecutor,
     Iterable<Path> ignorePaths,
     Iterable<String> ignoreGlobs,
     Watchman watchman,
     UUID queryUUID) {
   this(
       fileChangeEventBus,
       clock,
       objectMapper,
       processExecutor,
       DEFAULT_OVERFLOW_THRESHOLD,
       DEFAULT_TIMEOUT_MILLIS,
       createQuery(
           objectMapper,
           watchRoot,
           watchman.getProjectPrefix(),
           queryUUID.toString(),
           ignorePaths,
           ignoreGlobs,
           watchman.getCapabilities()));
 }
Пример #2
0
  @Before
  public void setUp() throws IOException, InterruptedException {
    executorService = Executors.newScheduledThreadPool(5);
    // In case root_restrict_files is enabled in /etc/watchmanconfig, assume
    // this is one of the entries so it doesn't give up.
    tmp.newFolder(".git");
    Watchman watchman =
        Watchman.build(tmp.getRootPath(), getWatchmanEnv(), new TestConsole(), new FakeClock(0));

    // We assume watchman has been installed and configured properly on the system, and that setting
    // up the watch is successful.
    assumeFalse(watchman == Watchman.NULL_WATCHMAN);
  }