blob: 91d2ffea4b809eda3934a7ed425ec74334b18fd5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.model.container.search.searchchain;
import com.yahoo.binaryprefix.BinaryPrefix;
import com.yahoo.binaryprefix.BinaryScaledAmount;
import com.yahoo.config.model.builder.xml.test.DomBuilderTest;
import com.yahoo.vespa.model.builder.xml.dom.chains.search.DomSearchChainsBuilder;
import org.junit.Before;
import org.w3c.dom.Element;
/** Creates SearchChains model from xml input.
* @author Tony Vaagenes
*/
public abstract class SearchChainsTestBase extends DomBuilderTest {
@Before
public void setupSearchChains() {
SearchChains searchChains = new DomSearchChainsBuilder().build(root, servicesXml());
searchChains.initialize(MockSearchClusters.twoMockClusterSpecsByName(root),
new BinaryScaledAmount(100, BinaryPrefix.mega));
root.freezeModelTopology();
}
abstract Element servicesXml();
}
|