use of com.yahoo.vespa.model.content.TuningDispatch in project vespa by vespa-engine.
the class DomTuningDispatchBuilderTest method requireThatEmptyTuningIsSafe.
@Test
public void requireThatEmptyTuningIsSafe() throws Exception {
TuningDispatch dispatch = newTuningDispatch("<content>" + " <tuning/>" + "</content>");
assertNull(dispatch.getMaxHitsPerPartition());
}
use of com.yahoo.vespa.model.content.TuningDispatch in project vespa by vespa-engine.
the class DomTuningDispatchBuilderTest method requireThatTuningDispatchCanBeBuilt.
@Test
public void requireThatTuningDispatchCanBeBuilt() throws Exception {
TuningDispatch dispatch = newTuningDispatch("<content>" + " <tuning>" + " <dispatch>" + " <max-hits-per-partition>69</max-hits-per-partition>" + " <min-group-coverage>7.5</min-group-coverage>" + " <min-active-docs-coverage>12.5</min-active-docs-coverage>" + " </dispatch>" + " </tuning>" + "</content>");
assertEquals(69, dispatch.getMaxHitsPerPartition().intValue());
assertEquals(7.5, dispatch.getMinGroupCoverage().doubleValue(), 0.0);
assertEquals(12.5, dispatch.getMinActiveDocsCoverage().doubleValue(), 0.0);
}
Aggregations