use of org.testng.annotations.BeforeTest in project athenz by yahoo.
the class PrincipalTokenTest method loadKeys.
@BeforeTest
private void loadKeys() throws IOException {
Path path = Paths.get("./src/test/resources/fantasy_public_k0.key");
servicePublicKeyStringK0 = new String(Files.readAllBytes(path));
path = Paths.get("./src/test/resources/fantasy_private_k0.key");
servicePrivateKeyStringK0 = new String(Files.readAllBytes(path));
path = Paths.get("./src/test/resources/fantasy_public_k1.key");
servicePublicKeyStringK1 = new String(Files.readAllBytes(path));
path = Paths.get("./src/test/resources/fantasy_private_k1.key");
servicePrivateKeyStringK1 = new String(Files.readAllBytes(path));
}
use of org.testng.annotations.BeforeTest in project athenz by yahoo.
the class RoleTokenTest method loadKeys.
@BeforeTest
private void loadKeys() throws IOException {
Path path = Paths.get("./src/test/resources/zts_public_k0.key");
ztsPublicKeyStringK0 = new String(Files.readAllBytes(path));
path = Paths.get("./src/test/resources/zts_public_k1.key");
ztsPublicKeyStringK1 = new String(Files.readAllBytes(path));
path = Paths.get("./src/test/resources/zts_private_k0.key");
ztsPrivateKeyStringK0 = new String(Files.readAllBytes(path));
path = Paths.get("./src/test/resources/zts_private_k1.key");
ztsPrivateKeyStringK1 = new String(Files.readAllBytes(path));
}
use of org.testng.annotations.BeforeTest in project athenz by yahoo.
the class TokenTest method loadKeys.
@BeforeTest
private void loadKeys() throws IOException {
Path path = Paths.get("./src/test/resources/fantasy_private_k0.key");
servicePrivateKeyStringK0 = new String(Files.readAllBytes(path));
path = Paths.get("./src/test/resources/fantasy_public_k0.key");
servicePublicKeyStringK0 = new String(Files.readAllBytes(path));
path = Paths.get("./src/test/resources/fantasy_private_k1.key");
servicePrivateKeyStringK1 = new String(Files.readAllBytes(path));
}
use of org.testng.annotations.BeforeTest in project rest.li by linkedin.
the class TestD2ConfigWithSingleZKFailover method setup.
@BeforeTest
public void setup() throws IOException, Exception {
// zkServer
_zkServer = ZKTestUtil.startZKServer();
_zkPort = _zkServer.getPort();
_zkHosts = ZK_HOST + ":" + _zkPort;
_zkUriString = "zk://" + _zkHosts;
// Register clusters/services (two services per cluster)
LoadBalancerClientCli.runDiscovery(_zkHosts, "/d2", D2_CONFIG_DATA);
// Get LoadBalancer Client
_cli = new LoadBalancerClientCli(_zkHosts, "/d2");
// Echo servers startup
startAllEchoServers();
assertAllEchoServersRunning(_echoServers);
_client = _cli.createClient(_cli.getZKClient(), _zkUriString, "/d2", "service-1_1");
_log.info(LoadBalancerClientCli.printStores(_cli.getZKClient(), _zkUriString, "/d2"));
assertAllEchoServersRegistered(_cli.getZKClient(), _zkUriString, _echoServers);
}
use of org.testng.annotations.BeforeTest in project pinot by linkedin.
the class RetentionManagerTest method setup.
@BeforeTest
public void setup() throws Exception {
_zookeeperInstance = ZkStarter.startLocalZkServer();
_zkClient = new ZkClient(ZK_STR);
_pinotHelixResourceManager = new PinotHelixResourceManager(ZK_STR, HELIX_CLUSTER_NAME, CONTROLLER_INSTANCE_NAME, null, 10000L, true, /*isUpdateStateModel=*/
false);
_pinotHelixResourceManager.start();
ControllerRequestBuilderUtil.addFakeDataInstancesToAutoJoinHelixCluster(HELIX_CLUSTER_NAME, ZK_STR, 2, true);
ControllerRequestBuilderUtil.addFakeBrokerInstancesToAutoJoinHelixCluster(HELIX_CLUSTER_NAME, ZK_STR, 2, true);
_helixAdmin = _pinotHelixResourceManager.getHelixAdmin();
_helixZkManager = _pinotHelixResourceManager.getHelixZkManager();
String OfflineTableConfigJson = ControllerRequestBuilderUtil.buildCreateOfflineTableJSON(_testTableName, null, null, 2).toString();
AbstractTableConfig offlineTableConfig = AbstractTableConfig.init(OfflineTableConfigJson);
_pinotHelixResourceManager.addTable(offlineTableConfig);
_propertyStore = ZkUtils.getZkPropertyStore(_helixZkManager, HELIX_CLUSTER_NAME);
}
Aggregations