Search in sources :

Example 26 with BeforeTest

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);
}
Also used : File(java.io.File) BeforeTest(org.testng.annotations.BeforeTest)

Example 27 with BeforeTest

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();
}
Also used : Assertion(org.testng.asserts.Assertion) BeforeTest(org.testng.annotations.BeforeTest)

Example 28 with BeforeTest

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();
}
Also used : Assertion(org.testng.asserts.Assertion) BeforeTest(org.testng.annotations.BeforeTest)

Example 29 with BeforeTest

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);
}
Also used : MaintenanceImplBase(com.coreos.jetcd.api.MaintenanceGrpc.MaintenanceImplBase) ByteString(com.google.protobuf.ByteString) BeforeTest(org.testng.annotations.BeforeTest)

Example 30 with BeforeTest

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);
}
Also used : LoadBalancerClientCli(com.linkedin.d2.balancer.util.LoadBalancerClientCli) BeforeTest(org.testng.annotations.BeforeTest)

Aggregations

BeforeTest (org.testng.annotations.BeforeTest)63 HashMap (java.util.HashMap)8 CommandManager (com.sun.identity.cli.CommandManager)6 Injector (com.google.inject.Injector)4 PinotHelixResourceManager (com.linkedin.pinot.controller.helix.core.PinotHelixResourceManager)4 File (java.io.File)4 AbstractTableConfig (com.linkedin.pinot.common.config.AbstractTableConfig)3 SSOException (com.iplanet.sso.SSOException)2 Schema (com.linkedin.pinot.common.data.Schema)2 SegmentGeneratorConfig (com.linkedin.pinot.core.indexsegment.generator.SegmentGeneratorConfig)2 SegmentIndexCreationDriver (com.linkedin.pinot.core.segment.creator.SegmentIndexCreationDriver)2 SegmentIndexCreationDriverImpl (com.linkedin.pinot.core.segment.creator.impl.SegmentIndexCreationDriverImpl)2 ThirdEyeConfigProperties (com.linkedin.thirdeye.hadoop.config.ThirdEyeConfigProperties)2 ODatabaseDocumentTx (com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx)2 OrganizationConfigManager (com.sun.identity.sm.OrganizationConfigManager)2 SMSException (com.sun.identity.sm.SMSException)2 MetricsRegistry (com.yammer.metrics.core.MetricsRegistry)2 URL (java.net.URL)2 ArrayList (java.util.ArrayList)2 ZkClient (org.I0Itec.zkclient.ZkClient)2