use of org.testng.annotations.BeforeClass in project pinot by linkedin.
the class RangeMergeOptimizerTest method setup.
@BeforeClass
public void setup() {
_compiler = new Pql2Compiler();
_optimizer = new RangeMergeOptimizer();
_builder = new FilterQueryOptimizerRequest.FilterQueryOptimizerRequestBuilder();
}
use of org.testng.annotations.BeforeClass in project pinot by linkedin.
the class SchemaTest method setUp.
@BeforeClass
public void setUp() throws IOException {
URL resourceUrl = getClass().getClassLoader().getResource("schemaTest.schema");
Preconditions.checkNotNull(resourceUrl);
schema = Schema.fromFile(new File(resourceUrl.getFile()));
}
use of org.testng.annotations.BeforeClass in project pinot by linkedin.
the class PinotTableRestletResourceTest method setUp.
@BeforeClass
public void setUp() {
startZk();
ControllerConf config = ControllerTestUtils.getDefaultControllerConfiguration();
config.setTableMinReplicas(TABLE_MIN_REPLICATION);
startController(config);
}
use of org.testng.annotations.BeforeClass in project pinot by linkedin.
the class TableSizeReaderTest method setUp.
@BeforeClass
public void setUp() throws IOException {
helix = mock(PinotHelixResourceManager.class);
when(helix.hasOfflineTable(anyString())).thenAnswer(new Answer() {
@Override
public Object answer(InvocationOnMock invocationOnMock) throws Throwable {
String table = (String) invocationOnMock.getArguments()[0];
return table.indexOf("offline") >= 0;
}
});
when(helix.hasRealtimeTable(anyString())).thenAnswer(new Answer() {
@Override
public Object answer(InvocationOnMock invocationOnMock) throws Throwable {
String table = (String) invocationOnMock.getArguments()[0];
return table.indexOf("realtime") >= 0;
}
});
int counter = 0;
// server0
FakeSizeServer s = new FakeSizeServer(Arrays.asList("s1", "s2", "s3"), serverPortStart + counter);
s.start(URI_PATH, createHandler(200, s.sizes, 0));
serverMap.put(serverName(counter), s);
++counter;
// server1
s = new FakeSizeServer(Arrays.asList("s2", "s5"), serverPortStart + counter);
s.start(URI_PATH, createHandler(200, s.sizes, 0));
serverMap.put(serverName(counter), s);
++counter;
// server2
s = new FakeSizeServer(Arrays.asList("s3", "s6"), serverPortStart + counter);
s.start(URI_PATH, createHandler(404, s.sizes, 0));
serverMap.put(serverName(counter), s);
++counter;
// server3
s = new FakeSizeServer(Arrays.asList("r1", "r2"), serverPortStart + counter);
s.start(URI_PATH, createHandler(200, s.sizes, 0));
serverMap.put(serverName(counter), s);
++counter;
// server4
s = new FakeSizeServer(Arrays.asList("r2"), serverPortStart + counter);
s.start(URI_PATH, createHandler(200, s.sizes, 0));
serverMap.put(serverName(counter), s);
++counter;
// server5 ... timing out server
s = new FakeSizeServer(Arrays.asList("s3", "s5"), serverPortStart + counter);
s.start(URI_PATH, createHandler(200, s.sizes, timeoutMsec * 100));
serverMap.put(serverName(counter), s);
++counter;
}
use of org.testng.annotations.BeforeClass in project pinot by linkedin.
the class ControllerSentinelTestV2 method setup.
@BeforeClass
public void setup() throws Exception {
startZk();
_zkClient = new ZkClient(ZkStarter.DEFAULT_ZK_STR);
startController();
_pinotResourceManager = _controllerStarter.getHelixResourceManager();
ControllerRequestBuilderUtil.addFakeBrokerInstancesToAutoJoinHelixCluster(HELIX_CLUSTER_NAME, ZkStarter.DEFAULT_ZK_STR, 20, true);
ControllerRequestBuilderUtil.addFakeDataInstancesToAutoJoinHelixCluster(HELIX_CLUSTER_NAME, ZkStarter.DEFAULT_ZK_STR, 20, true);
}
Aggregations