@Override protected void before() throws Throwable { create(); }
@Override protected void before() throws Throwable { create(); }
@Before public void setup() throws IOException { temporaryFolder.create(); mockArtifactPublisher = mock(DefaultGoPublisher.class); rootPath = new File("target/test"); rootPath.mkdirs(); }
@Before public void setUp() throws Exception { temporaryFolder.create(); }
@Before public void setup() throws IOException { temporaryFolder.create(); }
public static File writeYarnSiteConfigXML(Configuration yarnConf) throws IOException { tmp.create(); File yarnSiteXML = new File(tmp.newFolder().getAbsolutePath() + "/yarn-site.xml"); try (FileWriter writer = new FileWriter(yarnSiteXML)) { yarnConf.writeXml(writer); writer.flush(); } return yarnSiteXML; }
@Before public void beforeTest() throws IOException { temporaryFolder.create(); flinkJar = temporaryFolder.newFile("flink.jar"); }
@BeforeClass public static void beforeClass() throws IOException { temporaryFolder = new TemporaryFolder(); temporaryFolder.create(); }
@Before public void setUp() throws IOException { temporaryFolder.create(); tempWorkDir = temporaryFolder.newFolder(); }
@Before public void setUp() throws Exception { temporaryFolder.create(); tempSource = temporaryFolder.newFile("temp-file-in-plugin-monitor-test"); }
@Before public void setUp() throws IOException { temporaryFolder.create(); subversion = mock(Subversion.class); when(subversion.getUrl()).thenReturn(new UrlArgument(URL)); when(subversion.getPassword()).thenReturn(""); when(subversion.getUserName()).thenReturn(""); when(subversion.isCheckExternals()).thenReturn(false); svnMaterial = SvnMaterial.createSvnMaterialWithMock(subversion); svnMaterial.setUrl(URL); }
@Before public void setUp() throws IOException { temporaryFolder.create(); testFolder = temporaryFolder.newFolder(); publisher = mock(DefaultGoPublisher.class); generator = new UnitTestReportGenerator(publisher, testFolder); }
@Before public void setUp() throws Exception { // Have to call this as it uses another Junit runner which overrides the rule temporaryFolder.create(); subFolder = temporaryFolder.newFolder("subFolder"); File file = temporaryFolder.newFile("./originalCommand"); file.setExecutable(true); }
@Before public void setUp() throws Exception { super.setUp(); temporaryFolder.create(); initMocks(this); bundledPluginDir = temporaryFolder.newFolder("bundled-plugins"); pluginExternalDir = temporaryFolder.newFolder("external-plugins"); when(systemEnvironment.get(PLUGIN_LOCATION_MONITOR_INTERVAL_IN_SECONDS)).thenReturn(1); when(systemEnvironment.get(PLUGIN_GO_PROVIDED_PATH)).thenReturn(bundledPluginDir.getAbsolutePath()); when(systemEnvironment.get(PLUGIN_EXTERNAL_PROVIDED_PATH)).thenReturn(pluginExternalDir.getAbsolutePath()); monitor = new DefaultPluginJarLocationMonitor(systemEnvironment); monitor.initialize(); }
protected Configuration createClusterConfig() throws IOException { TemporaryFolder temporaryFolder = new TemporaryFolder(); temporaryFolder.create(); final File haDir = temporaryFolder.newFolder(); Configuration config = new Configuration(); config.setString(TaskManagerOptions.MANAGED_MEMORY_SIZE, "48m"); // the default network buffers size (10% of heap max =~ 150MB) seems to much for this test case config.setString(TaskManagerOptions.NETWORK_BUFFERS_MEMORY_MAX, String.valueOf(80L << 20)); // 80 MB config.setString(AkkaOptions.FRAMESIZE, String.valueOf(MAX_MEM_STATE_SIZE) + "b"); if (zkServer != null) { config.setString(HighAvailabilityOptions.HA_MODE, "ZOOKEEPER"); config.setString(HighAvailabilityOptions.HA_ZOOKEEPER_QUORUM, zkServer.getConnectString()); config.setString(HighAvailabilityOptions.HA_STORAGE_PATH, haDir.toURI().toString()); } return config; }
@Before public void setup() throws Exception { temporaryFolder.create(); GitTestRepo gitRepo = new GitTestRepo(temporaryFolder); outputStreamConsumer = inMemoryConsumer(); workingDir = temporaryFolder.newFolder("workingDir-" + System.currentTimeMillis()); repositoryUrl = gitRepo.projectRepositoryUrl(); git = new GitMaterial(repositoryUrl); gitFooBranchBundle = GitTestRepo.testRepoAtBranch(GIT_FOO_BRANCH_BUNDLE, BRANCH, temporaryFolder); }
@Before public void superSetup() throws IOException { temporaryFolder.delete(); temporaryFolder.create(); statusReporter = new BuildStateReporterStub(); buildVariables = new HashMap<>(); artifactsRepository = new ArtifactsRepositoryStub(); sandbox = temporaryFolder.newFolder(); console = new TestStreamConsumer(); httpService = new HttpServiceStub(); agentIdentifier = new AgentIdentifier("hostname", "ipaddress", "uuid"); }
@Before public void setupGraph() throws IOException { if ( testSupport == null ) { folder.create(); testSupport = newTestSupport(); testSupport.setup( folder.getRoot() ); graphDb = testSupport.graphBackdoor(); } testSupport.clearGraph(); }
@Before public void setUp() throws Exception { temporaryFolder.create(); hgTestRepo = new HgTestRepo("hgTestRepo1", temporaryFolder); hgMaterial = MaterialsMother.hgMaterial(hgTestRepo.projectRepositoryUrl()); workingFolder = temporaryFolder.newFolder("workingFolder"); outputStreamConsumer = inMemoryConsumer(); }
@Before public void setup() throws IOException { temporaryFolder.create(); testRepo = new SvnTestRepo(temporaryFolder); svnRepositoryUrl = testRepo.projectRepositoryUrl(); subversion = new SvnCommand(null, svnRepositoryUrl, "user", "pass", false); outputStreamConsumer = inMemoryConsumer(); checkoutFolder = temporaryFolder.newFolder("workingcopy"); }