GitWorkflowRepository extends FileBasedWorkflowRepository implements WorkflowRepository, FileBasedWorkflowRepositoryMXBean { @Override public synchronized void shutdown() { logger.info("Shutting down git workflow repository."); this.gitObserverStopped.set(true); observerThread.interrupt(); try { observerThread.join(); } catch (Exception e) { } super.shutdown(); }  synchronized void setGitRepositoryDir(File gitRepositoryDir); synchronized void setGitRepositoryDir(String gitRepositoryDir); synchronized File getGitRepositoryDir(); synchronized String getOriginUri(); synchronized String getBranch(); synchronized void setOriginURI(String originUri); synchronized void setCredentials(String username, char[] password); synchronized void setBranch(String branch); @Override synchronized void setCheckIntervalMSec(int checkIntervalMSec); @Override synchronized void start(); @Override synchronized void shutdown(); synchronized boolean isUp(); static final String ORIGIN; static final String DEFAULT_BRANCH; }
@Test public void shutdownTest() { assertEquals("wfRepos should be up.", true, wfRepo.isUp()); wfRepo.shutdown(); assertEquals("wfRepos should be down.", false, wfRepo.isUp()); }