Search in sources :

Example 6 with TuningDispatch

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());
}
Also used : TuningDispatch(com.yahoo.vespa.model.content.TuningDispatch) Test(org.junit.Test)

Example 7 with TuningDispatch

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);
}
Also used : TuningDispatch(com.yahoo.vespa.model.content.TuningDispatch) Test(org.junit.Test)

Aggregations

TuningDispatch (com.yahoo.vespa.model.content.TuningDispatch)7 Test (org.junit.Test)6 ModelElement (com.yahoo.vespa.model.builder.xml.dom.ModelElement)1