Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

Commit

Permalink
[REEF-460]: Remove all generated files on mvn clean
Browse files Browse the repository at this point in the history
This pull request addressed the issue by

* Change test root folder to `target/REEF_LOCAL_RUNTIME`

JIRA: [REEF-460](https://issues.apache.org/jira/browse/REEF-460)
  • Loading branch information
taegeonum committed Jul 13, 2015
1 parent 28e5ec0 commit 976958b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
Expand Up @@ -33,6 +33,7 @@ public void testHttpServer() throws BindException, InjectionException {

final Configuration runtimeConfiguration = LocalRuntimeConfiguration.CONF
.set(LocalRuntimeConfiguration.MAX_NUMBER_OF_EVALUATORS, 2)
.set(LocalRuntimeConfiguration.RUNTIME_ROOT_FOLDER, "target/REEF_LOCAL_RUNTIME")
.build();

final LauncherStatus status = HelloREEFHttp.runHelloReef(runtimeConfiguration, 10 * 1000);
Expand Down
Expand Up @@ -29,7 +29,9 @@
import org.apache.reef.runtime.common.utils.RemoteManager;
import org.apache.reef.runtime.local.client.parameters.MaxNumberOfEvaluators;
import org.apache.reef.runtime.local.client.parameters.RackNames;
import org.apache.reef.runtime.local.client.parameters.RootFolder;
import org.apache.reef.tang.Injector;
import org.apache.reef.tang.JavaConfigurationBuilder;
import org.apache.reef.tang.Tang;
import org.apache.reef.tang.exceptions.InjectionException;
import org.apache.reef.tang.formats.ConfigurationSerializer;
Expand All @@ -47,10 +49,7 @@
import java.util.List;
import java.util.Set;

import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.any;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.*;

/**
* Unit test for Resource Manager (and ContainerManager) classes.
Expand All @@ -75,7 +74,9 @@ public class ResourceManagerTest {
@SuppressWarnings("unchecked")
@Before
public void setUp() throws InjectionException {
injector = Tang.Factory.getTang().newInjector();
JavaConfigurationBuilder cb = Tang.Factory.getTang().newConfigurationBuilder();
cb.bindNamedParameter(RootFolder.class, "target/REEF_LOCAL_RUNTIME");
injector = Tang.Factory.getTang().newInjector(cb.build());
remoteManager = injector.getInstance(RemoteManager.class);
mockRuntimeResourceStatusHandler = mock(EventHandler.class);
injector.bindVolatileParameter(RuntimeParameters.ResourceStatusHandler.class, mockRuntimeResourceStatusHandler);
Expand Down
Expand Up @@ -45,6 +45,7 @@ public synchronized final Configuration getRuntimeConfiguration() {
if (null == rootFolder) {
return LocalRuntimeConfiguration.CONF
.set(LocalRuntimeConfiguration.MAX_NUMBER_OF_EVALUATORS, MAX_NUMBER_OF_EVALUATORS)
.set(LocalRuntimeConfiguration.RUNTIME_ROOT_FOLDER, "target/REEF_LOCAL_RUNTIME")
.build();
} else {
return LocalRuntimeConfiguration.CONF
Expand Down

0 comments on commit 976958b

Please sign in to comment.