Search in sources :

Example 1 with ContextIdentifier

use of org.apache.reef.evaluator.context.parameters.ContextIdentifier in project heron by twitter.

the class HeronMasterDriverTest method createContextConfigCreatesForGivenWorkerId.

@Test
public void createContextConfigCreatesForGivenWorkerId() {
    Configuration config = driver.createContextConfig(4);
    boolean found = false;
    for (NamedParameterNode<?> namedParameterNode : config.getNamedParameters()) {
        if (namedParameterNode.getName().equals(ContextIdentifier.class.getSimpleName())) {
            Assert.assertEquals("4", config.getNamedParameter(namedParameterNode));
            found = true;
        }
    }
    assertTrue("ContextIdentifier didn't exist.", found);
}
Also used : Configuration(org.apache.reef.tang.Configuration) ContextIdentifier(org.apache.reef.evaluator.context.parameters.ContextIdentifier) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest) Test(org.junit.Test)

Aggregations

ContextIdentifier (org.apache.reef.evaluator.context.parameters.ContextIdentifier)1 Configuration (org.apache.reef.tang.Configuration)1 Test (org.junit.Test)1 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)1