use of org.testng.annotations.BeforeTest in project trex-stateless-gui by cisco-system-traffic-generator.
the class UIBaseTest method setUpClass.
@BeforeTest
public void setUpClass() throws Exception {
// remove appData folder
File trexDirectory = new File(System.getenv("LOCALAPPDATA") + APP_DATA_PATH);
if (trexDirectory.exists()) {
FileUtils.deleteQuietly(trexDirectory);
}
ApplicationTest.launch(TrexApp.class);
}
use of org.testng.annotations.BeforeTest in project jetcd by coreos.
the class KVTest method setUp.
@BeforeTest
public void setUp() throws Exception {
test = new Assertion();
Client client = ClientBuilder.newBuilder().endpoints("http://localhost:2379").build();
kvClient = client.getKVClient();
}
use of org.testng.annotations.BeforeTest in project jetcd by coreos.
the class AuthClientTest method setupEnv.
/**
* Build etcd client to create role, permission
*/
@BeforeTest
public void setupEnv() throws AuthFailedException, ConnectException {
this.test = new Assertion();
this.client = ClientBuilder.newBuilder().endpoints("localhost:2379").build();
this.kvClient = this.client.getKVClient();
this.authClient = this.client.getAuthClient();
}
use of org.testng.annotations.BeforeTest in project jetcd by coreos.
the class MaintenanceUnitTest method setUp.
@BeforeTest
public void setUp() throws AuthFailedException, ConnectException, IOException {
String uniqueServerName = "fake server for " + getClass();
fakeServer = InProcessServerBuilder.forName(uniqueServerName).fallbackHandlerRegistry(serviceRegistry).directExecutor().build().start();
maintenanceCli = new MaintenanceImpl(InProcessChannelBuilder.forName(uniqueServerName).directExecutor().build(), Optional.empty());
MaintenanceImplBase base = this.defaultBase(responseObserverRef);
serviceRegistry.addService(base);
}
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);
}
Aggregations