use of org.testng.annotations.BeforeClass in project async-http-client by AsyncHttpClient.
the class AbstractBasicTest method setUpGlobal.
@BeforeClass(alwaysRun = true)
public void setUpGlobal() throws Exception {
server = new Server();
ServerConnector connector = addHttpConnector(server);
server.setHandler(getWebSocketHandler());
server.start();
port1 = connector.getLocalPort();
logger.info("Local HTTP server started successfully");
}
use of org.testng.annotations.BeforeClass in project pulsar by yahoo.
the class CallbackMutexTest method setup.
@BeforeClass
public void setup() {
Logger log = Logger.getLogger(CallbackMutex.class);
log.setLevel(Level.DEBUG);
}
use of org.testng.annotations.BeforeClass in project jdk8u_jdk by JetBrains.
the class StreamTest method setupTestFolder.
@BeforeClass
void setupTestFolder() throws IOException {
testFolder = TestUtil.createTemporaryDirectory();
supportsLinks = TestUtil.supportsLinks(testFolder);
TreeSet<Path> set = new TreeSet<>();
// Level 1
Path empty = testFolder.resolve("empty");
Path file = testFolder.resolve("file");
Path dir = testFolder.resolve("dir");
Path dir2 = testFolder.resolve("dir2");
Files.createDirectory(empty);
Files.createFile(file);
Files.createDirectory(dir);
Files.createDirectory(dir2);
set.add(empty);
set.add(file);
set.add(dir);
set.add(dir2);
if (supportsLinks) {
Path tmp = testFolder.resolve("linkDir");
Files.createSymbolicLink(tmp, dir);
set.add(tmp);
tmp = testFolder.resolve("linkFile");
Files.createSymbolicLink(tmp, file);
set.add(tmp);
}
level1 = set.toArray(new Path[0]);
// Level 2
Path tmp = dir.resolve("d1");
Files.createDirectory(tmp);
set.add(tmp);
tmp = dir.resolve("f1");
Files.createFile(tmp);
set.add(tmp);
if (supportsLinks) {
tmp = dir.resolve("lnDir2");
Files.createSymbolicLink(tmp, dir2);
set.add(tmp);
}
// walk include starting folder
set.add(testFolder);
all = set.toArray(new Path[0]);
// Follow links
if (supportsLinks) {
tmp = testFolder.resolve("linkDir");
set.add(tmp.resolve("d1"));
set.add(tmp.resolve("f1"));
tmp = tmp.resolve("lnDir2");
set.add(tmp);
}
all_folowLinks = set.toArray(new Path[0]);
}
use of org.testng.annotations.BeforeClass in project oxAuth by GluuFederation.
the class UmaMultithreadTest method before.
@BeforeClass
public void before() {
ClientConnectionManager connectoinManager = new PoolingClientConnectionManager();
final DefaultHttpClient defaultHttpClient = new DefaultHttpClient(connectoinManager);
final ApacheHttpClient4Executor clientExecutor = new ApacheHttpClient4Executor(defaultHttpClient);
String url = serverUri + "/oxauth/seam/resource/restv1/oxauth/uma-configuration";
service = UmaClientFactory.instance().createMetaDataConfigurationService(url, clientExecutor);
}
use of org.testng.annotations.BeforeClass in project oxAuth by GluuFederation.
the class BenchmarkRequestAccessToken method registerClient.
@Parameters({ "userId", "userSecret", "redirectUris", "sectorIdentifierUri" })
@BeforeClass
public void registerClient(final String userId, final String userSecret, String redirectUris, String sectorIdentifierUri) throws Exception {
Reporter.log("Register client", true);
List<ResponseType> responseTypes = new ArrayList<ResponseType>();
RegisterRequest registerRequest = new RegisterRequest(ApplicationType.WEB, "oxAuth benchmark test app", StringUtils.spaceSeparatedToList(redirectUris));
registerRequest.setResponseTypes(responseTypes);
registerRequest.setSectorIdentifierUri(sectorIdentifierUri);
RegisterClient registerClient = new RegisterClient(registrationEndpoint);
registerClient.setRequest(registerRequest);
RegisterResponse registerResponse = registerClient.exec();
assertEquals(registerResponse.getStatus(), 200, "Unexpected response code: " + registerResponse.getEntity());
assertNotNull(registerResponse.getClientId());
assertNotNull(registerResponse.getClientSecret());
assertNotNull(registerResponse.getRegistrationAccessToken());
assertNotNull(registerResponse.getClientIdIssuedAt());
assertNotNull(registerResponse.getClientSecretExpiresAt());
this.clientId = registerResponse.getClientId();
this.clientSecret = registerResponse.getClientSecret();
}
Aggregations