本文整理汇总了Java中org.wso2.carbon.automation.engine.context.TestUserMode类的典型用法代码示例。如果您正苦于以下问题:Java TestUserMode类的具体用法?Java TestUserMode怎么用?Java TestUserMode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TestUserMode类属于org.wso2.carbon.automation.engine.context包,在下文中一共展示了TestUserMode类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: serviceDeployment
import org.wso2.carbon.automation.engine.context.TestUserMode; //导入依赖的package包/类
@BeforeClass(alwaysRun = true)
public void serviceDeployment() throws Exception {
super.init(TestUserMode.SUPER_TENANT_ADMIN);
serverConfigurationManager = new ServerConfigurationManager(dssContext);
serverConfigurationManager.applyConfiguration(new File(getResourceLocation() + File.separator + "config" +
File.separator + "CARBON1352" + File.separator +
"axis2.xml"));
List<File> sqlFileLis = new ArrayList<>();
sqlFileLis.add(selectSqlFile("CreateTables.sql"));
sqlFileLis.add(selectSqlFile("Offices.sql"));
client = new SimpleHttpClient();
headers = new HashMap<>();
super.init(TestUserMode.SUPER_TENANT_ADMIN);
deployService(serviceName, createArtifact(getResourceLocation() + File.separator + "dbs" + File.separator +
"rdbms" + File.separator + "h2" + File.separator +
"H2JsonSecureServiceTest.dbs", sqlFileLis));
serviceEndPoint = getServiceUrlHttps("H2JsonSecureServiceTest") + "/";
}
开发者ID:wso2,项目名称:product-ei,代码行数:19,代码来源:CARBON15261JsonFormatterTest.java
示例2: unDeployServices
import org.wso2.carbon.automation.engine.context.TestUserMode; //导入依赖的package包/类
@AfterTest(alwaysRun = true)
public void unDeployServices()
throws IOException, LoginAuthenticationExceptionException, ExceptionException,
XPathExpressionException, URISyntaxException, SAXException, XMLStreamException, AutomationUtilException {
if (TestConfigurationProvider.isIntegration() && axis2Server1 != null && axis2Server1.isStarted()) {
axis2Server1.stop();
} else {
AutomationContext asContext = new AutomationContext("AS", TestUserMode.SUPER_TENANT_ADMIN);
int deploymentDelay = TestConfigurationProvider.getServiceDeploymentDelay();
String serviceName = "SecureStockQuoteServiceScenario";
ServiceDeploymentUtil deployer = new ServiceDeploymentUtil();
LoginLogoutClient loginLogoutClient = new LoginLogoutClient(asContext);
for (int i = 1; i < 9; i++) {
deployer.unDeployArrService(asContext.getContextUrls().getBackEndUrl(), loginLogoutClient.login()
, serviceName + i, deploymentDelay);
}
}
}
开发者ID:wso2,项目名称:product-ei,代码行数:20,代码来源:Axis2ServerStartupWithSecuredServices.java
示例3: initialize
import org.wso2.carbon.automation.engine.context.TestUserMode; //导入依赖的package包/类
@BeforeClass(alwaysRun = true)
public void initialize() throws Exception {
super.init(userMode);
String resourceFileLocation;
resourceFileLocation = getResourceLocation();
//DataSource already exist by default for super user.
if (userMode == TestUserMode.TENANT_ADMIN || userMode == TestUserMode.TENANT_USER) {
addDataSources();
}
deployService(serviceName,
new DataHandler(new URL("file:///" + resourceFileLocation +
File.separator + "samples" + File.separator +
"dbs" + File.separator + "inmemory" + File.separator +
"InMemoryDSSample.dbs")));
log.info(serviceName + " uploaded");
serviceUrl = getServiceUrlHttp(serviceName);
}
开发者ID:wso2,项目名称:product-ei,代码行数:18,代码来源:InMemoryDSSampleTestCase.java
示例4: initialize
import org.wso2.carbon.automation.engine.context.TestUserMode; //导入依赖的package包/类
@BeforeClass(alwaysRun = true, enabled = false)
public void initialize() throws Exception {
super.init(userMode);
String resourceFileLocation;
feedURL = "https://mail.google.com/mail/feed/atom";
mailCountBeforeTestStart = getMailCount(feedURL);
modifiedTime = getModifiedTime(feedURL);
eventingSampleStub = new EventingSampleStub(serverEpr);
serverEpr = getServiceUrlHttp(serviceName);
// productCode = "code" + System.currentTimeMillis();
productCode = "999";
updateAxis2_ClientXML();
new ServerConfigurationManager("DSS", TestUserMode.SUPER_TENANT_ADMIN).restartGracefully();
super.init();
resourceFileLocation = getResourceLocation();
deployService(serviceName,
new DataHandler(new URL("file:///" + resourceFileLocation +
File.separator + "samples" + File.separator +
"dbs" + File.separator + "rdbms" + File.separator +
"EventingSample.dbs")));
log.info(serviceName + " uploaded");
}
开发者ID:wso2,项目名称:product-ei,代码行数:26,代码来源:EventingSampleTestCase.java
示例5: init
import org.wso2.carbon.automation.engine.context.TestUserMode; //导入依赖的package包/类
@BeforeClass(alwaysRun = true)
public void init() throws Exception {
super.init();
serverConfigurationManagerProp = new ServerConfigurationManager(new AutomationContext("ESB", TestUserMode.SUPER_TENANT_ADMIN));
String nhttpFile = /*ProductConstant.getResourceLocations(ProductConstant.ESB_SERVER_NAME)*/FrameworkPathUtil.getSystemResourceLocation() + "artifacts" + separator +
"ESB" +separator + "synapseconfig" + separator + "MaxOpenConnections" + separator
+ "nhttp.properties";
File srcFile = new File(nhttpFile);
serverConfigurationManagerProp.applyConfigurationWithoutRestart(srcFile);
serverConfigurationManagerAxis2 = new ServerConfigurationManager(new AutomationContext("ESB", TestUserMode.SUPER_TENANT_ADMIN));
String nhttpAxis2xml = /*ProductConstant.getResourceLocations(ProductConstant.ESB_SERVER_NAME)*/FrameworkPathUtil.getSystemResourceLocation() + "artifacts" + separator +
"ESB" +separator +separator + "synapseconfig" + separator + "MaxOpenConnections" + separator + "nhttp"
+ separator + "axis2.xml";
File axis2File = new File(nhttpAxis2xml);
serverConfigurationManagerAxis2.applyConfiguration(axis2File);
super.init();
list = Collections.synchronizedList(new ArrayList());
maxOpenConnectionClients = new MaximumOpenConnectionsClient[CONCURRENT_CLIENTS];
clients = new Thread[CONCURRENT_CLIENTS];
}
开发者ID:wso2,项目名称:product-ei,代码行数:27,代码来源:NhttpMaximumOpenConnections.java
示例6: setEnvironment
import org.wso2.carbon.automation.engine.context.TestUserMode; //导入依赖的package包/类
@BeforeClass(alwaysRun = true)
public void setEnvironment() throws Exception {
super.init();
serverConfigurationManager =
new ServerConfigurationManager(new AutomationContext("ESB",
TestUserMode.SUPER_TENANT_ADMIN));
String carbonHome = System.getProperty(ServerConstants.CARBON_HOME);
String confDir = carbonHome + File.separator + "conf" + File.separator;
File originalConfig = new File(getESBResourceLocation() + File.separator + "synapseconfig" + File.separator +
"nhttp_transport" + File.separator + "default_content_type_axis2.xml");
File destDir = new File(confDir + "axis2" + File.separator);
FileUtils.copyFileToDirectory(originalConfig, destDir);
serverConfigurationManager.restartGracefully();
super.init();
loadESBConfigurationFromClasspath("/artifacts/ESB/synapseconfig/nhttp_transport"
+ "/default_content_type_synapse.xml");
}
开发者ID:wso2,项目名称:product-ei,代码行数:21,代码来源:DefaultRequestContentTypeTestCase.java
示例7: init
import org.wso2.carbon.automation.engine.context.TestUserMode; //导入依赖的package包/类
@BeforeClass(alwaysRun = true)
public void init() throws Exception {
super.init();
pathToVfsDir = getClass().getResource(File.separator + "artifacts" + File.separator + "ESB" +
File.separator + "synapseconfig" + File.separator +
"vfsTransport" + File.separator).getPath(); // change this to get samba path
serverConfigurationManager = new ServerConfigurationManager(new AutomationContext("ESB", TestUserMode.SUPER_TENANT_ADMIN));
serverConfigurationManager.applyConfiguration(new File(pathToVfsDir + File.separator + "axis2.xml"));
super.init();
File outFolder = new File(pathToVfsDir + "test" + File.separator + "out" + File.separator);
File inFolder = new File(pathToVfsDir + "test" + File.separator + "in" + File.separator);
File originalFolder = new File(pathToVfsDir + "test" + File.separator + "original" + File.separator);
File failureFolder = new File(pathToVfsDir + "test" + File.separator + "failure" + File.separator);
assertTrue(outFolder.mkdirs(), "file folder not created");
assertTrue(inFolder.mkdirs(), "file folder not created");
assertTrue(originalFolder.mkdirs(), "file folder not created");
assertTrue(failureFolder.mkdirs(), "file folder not created");
assertTrue(outFolder.exists(), "File folder doesn't exists");
assertTrue(inFolder.exists(), "File folder doesn't exists");
assertTrue(originalFolder.exists(), "File folder doesn't exists");
assertTrue(failureFolder.exists(), "File folder doesn't exists");
}
开发者ID:wso2,项目名称:product-ei,代码行数:25,代码来源:Sample265TestCase.java
示例8: setEnvironment
import org.wso2.carbon.automation.engine.context.TestUserMode; //导入依赖的package包/类
@BeforeClass(alwaysRun = true)
public void setEnvironment() throws Exception {
super.init();
serverManager = new ServerConfigurationManager(new AutomationContext("ESB", TestUserMode.SUPER_TENANT_ADMIN));
File sourceFile = new File(FrameworkPathUtil.getSystemResourceLocation() + "artifacts" + File.separator +
"ESB" + File.separator + "streamingxpath" + File.separator + "synapse.properties");
serverManager.applyConfiguration(sourceFile);
super.init();
String relativePath = "artifacts" + File.separator + "ESB" + File.separator + "streamingxpath" +
File.separator + "StreamingException.xml";
ESBTestCaseUtils util = new ESBTestCaseUtils();
OMElement proxyConfig = util.loadResource(relativePath);
try {
addProxyService(proxyConfig);
} catch (Exception ignore) {
exceptionCaught=true;
}
}
开发者ID:wso2,项目名称:product-ei,代码行数:21,代码来源:StreamingXpathExceptionTestCase.java
示例9: startJMSBrokerAndConfigureESB
import org.wso2.carbon.automation.engine.context.TestUserMode; //导入依赖的package包/类
@BeforeClass(alwaysRun = true)
public void startJMSBrokerAndConfigureESB() throws Exception {
super.init();
context = new AutomationContext("ESB", TestUserMode.SUPER_TENANT_ADMIN);
super.init();
loadSampleESBConfiguration(705);
axis2Server1 = new SampleAxis2Server("test_axis2_server_9001.xml");
axis2Server2 = new SampleAxis2Server("test_axis2_server_9002.xml");
axis2Server3 = new SampleAxis2Server("test_axis2_server_9003.xml");
axis2Server1.deployService(SampleAxis2Server.SIMPLE_STOCK_QUOTE_SERVICE);
axis2Server1.start();
axis2Server2.deployService(SampleAxis2Server.SIMPLE_STOCK_QUOTE_SERVICE);
axis2Server2.start();
axis2Server3.deployService(SampleAxis2Server.SIMPLE_STOCK_QUOTE_SERVICE);
axis2Server3.start();
}
开发者ID:wso2,项目名称:product-ei,代码行数:22,代码来源:Sample705TestCase.java
示例10: startServerWithEagerLoading
import org.wso2.carbon.automation.engine.context.TestUserMode; //导入依赖的package包/类
@BeforeClass(alwaysRun = true)
protected void startServerWithEagerLoading() throws Exception {
super.init(TestUserMode.SUPER_TENANT_USER);
serverManager = new ServerConfigurationManager(context);
AutomationContext autoContext = new AutomationContext();
// upload a faulty sequence which refer registry resource doesn't exists
FileUtils.copyFileToDirectory(new File(FrameworkPathUtil.getSystemResourceLocation() +
"/artifacts/ESB/eager/loading/ESBJAVA3602-FaultySeq.xml"),
getSynapseDeploymentDir());
File carbonXml = new File(FrameworkPathUtil.getSystemResourceLocation() +
"/artifacts/ESB/eager/loading/ESBJAVA3602Carbon.xml");
serverManager.applyConfiguration(carbonXml, getCarbonXmlFile());
super.init(TestUserMode.TENANT_ADMIN);
logViewerClient = new LogViewerClient(contextUrls.getBackEndUrl(), getSessionCookie());
}
开发者ID:wso2,项目名称:product-ei,代码行数:18,代码来源:EagerLoadingTestCase.java
示例11: initialize
import org.wso2.carbon.automation.engine.context.TestUserMode; //导入依赖的package包/类
@BeforeClass(alwaysRun = true)
protected void initialize() throws Exception {
//Starting the thrift port to listen to statistics events
thriftServer = new ThriftServer("Wso2EventTestCase", 7612, true);
thriftServer.start(7612);
log.info("Thrift Server is Started on port 8462");
//Changing synapse configuration to enable statistics and tracing
serverConfigurationManager =
new ServerConfigurationManager(new AutomationContext("ESB", TestUserMode.SUPER_TENANT_ADMIN));
serverConfigurationManager.applyConfiguration(
new File(getESBResourceLocation() + File.separator + "StatisticTestResources" + File.separator +
"synapse.properties"));
super.init();
thriftServer.resetMsgCount();
thriftServer.resetPreservedEventList();
//load esb configuration to the server
loadESBConfigurationFromClasspath("/artifacts/ESB/synapseconfig/statistics/sequencereference.xml");
thriftServer.waitToReceiveEvents(20000, 6); //waiting for esb to send artifact config data to the thriftserver
//Checking whether all the artifact configuration events are received
Assert.assertEquals("Six configuration events are required", 6, thriftServer.getMsgCount());
}
开发者ID:wso2,项目名称:product-ei,代码行数:25,代码来源:SequenceStatisticsTest.java
示例12: setEnvironment
import org.wso2.carbon.automation.engine.context.TestUserMode; //导入依赖的package包/类
@BeforeClass(alwaysRun = true)
public void setEnvironment() throws Exception {
super.init();
serverConfigurationManager =
new ServerConfigurationManager(new AutomationContext("ESB", TestUserMode.SUPER_TENANT_ADMIN));
serverConfigurationManager.applyConfigurationWithoutRestart(new File(FULL_RESOURCE_PATH + "axis2.xml"));
serverConfigurationManager.copyToComponentLib
(new File(getClass().getResource(JAR_LOCATION + File.separator + HAWTBUF).toURI()));
serverConfigurationManager.copyToComponentLib
(new File(getClass().getResource(JAR_LOCATION + File.separator + ACTIVEMQ_BROKER).toURI()));
serverConfigurationManager.copyToComponentLib
(new File(getClass().getResource(JAR_LOCATION + File.separator + ACTIVEMQ_CLIENT).toURI()));
serverConfigurationManager.copyToComponentLib
(new File(getClass().getResource(JAR_LOCATION + File.separator + GERONIMO_J2EE_MANAGEMENT).toURI()));
serverConfigurationManager.copyToComponentLib
(new File(getClass().getResource(JAR_LOCATION + File.separator + GERONIMO_JMS).toURI()));
serverConfigurationManager.restartGracefully();
super.init();
addInboundEndpoint(esbUtils.loadResource(RELATIVE_RESOURCE_PATH + "JMSEndpoint.xml"));
logViewerClient = new LogViewerClient(contextUrls.getBackEndUrl(), getSessionCookie());
}
开发者ID:wso2,项目名称:product-ei,代码行数:22,代码来源:InboundEPWithNonWorkerManager.java
示例13: setEnvironment
import org.wso2.carbon.automation.engine.context.TestUserMode; //导入依赖的package包/类
@BeforeTest(alwaysRun = true)
public void setEnvironment() throws Exception {
super.init(TestUserMode.TENANT_ADMIN);
serverManager = new ServerConfigurationManager(context);
File sourceFile = new File(FrameworkPathUtil.getSystemResourceLocation() + "artifacts" + File.separator +
"ESB" + File.separator + "json" + File.separator + "tenant-axis2.xml");
File targetFile = new File(CarbonUtils.getCarbonHome() + File.separator + "conf"
+ File.separator + "axis2" + File.separator + "tenant-axis2.xml");
serverManager.applyConfigurationWithoutRestart(sourceFile, targetFile, true);
loadESBConfigurationFromClasspath("/artifacts/ESB/json/tenant-json-test-case.xml");
//Give some time to load the configuration since this test is failing intermittently due to not deploying the artifact
Thread.sleep(3000);
serviceUrl = context.getContextUrls().getServiceUrl() + "/jsonproducer/";
jsonClient = new JSONClient();
}
开发者ID:wso2,项目名称:product-ei,代码行数:20,代码来源:CARBON14965TenantJsonFormatter.java
示例14: init
import org.wso2.carbon.automation.engine.context.TestUserMode; //导入依赖的package包/类
@BeforeClass(alwaysRun = true)
public void init() throws Exception {
super.init();
serverConfigurationManager = new ServerConfigurationManager(new AutomationContext("ESB", TestUserMode.SUPER_TENANT_ADMIN));
String nhttpFile = FrameworkPathUtil.getSystemResourceLocation() + "artifacts" + separator + "ESB" + separator +
"passthru" + separator + "transport" + separator + "httpaccesslogs" + separator + "nhttp.properties";
File srcFile = new File(nhttpFile);
String carbonHome = System.getProperty(ServerConstants.CARBON_HOME);
httpLogDir = carbonHome + File.separator + "repository" + File.separator + "logs" + File.separator + "httpLogs";
File log4jProperties = new File(carbonHome + File.separator + "conf" +
File.separator + "log4j.properties");
String propertyName = "nhttp.log.directory";
createNewDir(httpLogDir);
applyProperty(srcFile, propertyName, httpLogDir);
applyProperty(log4jProperties, "log4j.logger.org.apache.synapse.transport.http.access", "DEBUG");
serverConfigurationManager.restartGracefully();
super.init();
verifyProxyServiceExistence("HttpAccessLogsTestProxy");
}
开发者ID:wso2,项目名称:product-ei,代码行数:23,代码来源:HttpAccessLogTestCase.java
示例15: init
import org.wso2.carbon.automation.engine.context.TestUserMode; //导入依赖的package包/类
@BeforeClass(alwaysRun = true)
public void init() throws Exception {
super.init();
configurationManagerAxis2 =
new ServerConfigurationManager(new AutomationContext("ESB", TestUserMode.SUPER_TENANT_ADMIN));
File customAxisConfigAxis2 = new File(getESBResourceLocation() + File.separator +
"axis2config" + File.separator + "axis2.xml");
configurationManagerAxis2.applyConfiguration(customAxisConfigAxis2);
super.init();
rabbitMQServer = RabbitMQTestUtils.getRabbitMQServerInstance();
//This is to stop existing rabbitMQ server instances
rabbitMQServer.stop();
rabbitMQServer.start();
Assert.assertTrue(rabbitMQServer.isRabbitMQStarted(90), "Failed to start rabbitMQ server properly within given timeout");
initRabbitMQBroker();
loadESBConfigurationFromClasspath("/artifacts/ESB/rabbitmq/multipleListner/RabbitMQMultipleListnerProxy.xml");
proxyServiceAdminClient = new ProxyServiceAdminClient(contextUrls.getBackEndUrl(), getSessionCookie());
}
开发者ID:wso2,项目名称:product-ei,代码行数:20,代码来源:ESBJAVA4630RabbitMQMultipleListnerTestCase.java
示例16: init
import org.wso2.carbon.automation.engine.context.TestUserMode; //导入依赖的package包/类
@BeforeClass(alwaysRun = true)
public void init() throws Exception {
super.init();
rabbitMQServer = RabbitMQTestUtils.getRabbitMQServerInstance();
sender = new RabbitMQProducerClient("localhost", 5672, "guest", "guest");
consumer = new RabbitMQConsumerClient("localhost");
configurationManagerAxis2 =
new ServerConfigurationManager(new AutomationContext("ESB", TestUserMode.SUPER_TENANT_ADMIN));
File customAxisConfigAxis2 = new File(getESBResourceLocation() + File.separator +
"axis2config" + File.separator + "axis2.xml");
configurationManagerAxis2.applyConfiguration(customAxisConfigAxis2);
super.init();
logViewer = new LogViewerClient(contextUrls.getBackEndUrl(), getSessionCookie());
loadESBConfigurationFromClasspath("/artifacts/ESB/rabbitmq/transport/rabbitmq_consumer_proxy.xml");
}
开发者ID:wso2,项目名称:product-ei,代码行数:20,代码来源:RabbitMQReceiverConnectionRecoveryTestCase.java
示例17: init
import org.wso2.carbon.automation.engine.context.TestUserMode; //导入依赖的package包/类
@BeforeClass(alwaysRun = true)
public void init() throws Exception {
super.init();
rabbitMQServer = RabbitMQTestUtils.getRabbitMQServerInstance();
configurationManagerAxis2 =
new ServerConfigurationManager(new AutomationContext("ESB", TestUserMode.SUPER_TENANT_ADMIN));
File customAxisConfigAxis2 = new File(getESBResourceLocation() + File.separator +
"axis2config" + File.separator + "axis2.xml");
configurationManagerAxis2.applyConfiguration(customAxisConfigAxis2);
super.init();
loadESBConfigurationFromClasspath("/artifacts/ESB/rabbitmq/transport/rabbitmq_endpoint_proxy.xml");
}
开发者ID:wso2,项目名称:product-ei,代码行数:17,代码来源:RabbitMQSenderConnectionRecoveryTestCase.java
示例18: init
import org.wso2.carbon.automation.engine.context.TestUserMode; //导入依赖的package包/类
protected void init() throws Exception {
ssServer = new AutomationContext(PRODUCT_GROUP_NAME, TestUserMode.SUPER_TENANT_ADMIN);
loginLogoutClient = new LoginLogoutClient(ssServer);
sessionCookie = loginLogoutClient.login();
backendURL = ssServer.getContextUrls().getBackEndUrl();
this.driver = BrowserManager.getWebDriver();
}
开发者ID:wso2,项目名称:product-ei,代码行数:8,代码来源:BPSIntegrationUiBaseTest.java
示例19: init
import org.wso2.carbon.automation.engine.context.TestUserMode; //导入依赖的package包/类
protected void init(TestUserMode testUserMode) throws Exception {
bpsServer = new AutomationContext("BPS", testUserMode);
loginLogoutClient = new LoginLogoutClient(bpsServer);
sessionCookie = loginLogoutClient.login();
backEndUrl = bpsServer.getContextUrls().getBackEndUrl();
serviceUrl = bpsServer.getContextUrls().getServiceUrl();
bpelUploaderClient = new BpelUploaderClient(backEndUrl, sessionCookie);
humanTaskUploaderClient = new HumanTaskUploaderClient(backEndUrl, sessionCookie);
bpmnUploaderClient = new BPMNUploaderClient(backEndUrl, sessionCookie);
}
开发者ID:wso2,项目名称:product-ei,代码行数:11,代码来源:BPSMasterTest.java
示例20: init
import org.wso2.carbon.automation.engine.context.TestUserMode; //导入依赖的package包/类
protected void init(TestUserMode userType) throws Exception {
// dssContext = new AutomationContext("DSS", "dss01", "carbon.supper", "admin");
dssContext = new AutomationContext(PRODUCT_NAME, userType);
LoginLogoutClient loginLogoutClient = new LoginLogoutClient(dssContext);
sessionCookie = loginLogoutClient.login();
//return the current tenant as the userType(TestUserMode)
tenantInfo = dssContext.getContextTenant();
//return the user information initialized with the system
userInfo = tenantInfo.getContextUser();
}
开发者ID:wso2,项目名称:product-ei,代码行数:12,代码来源:DSSIntegrationTest.java
注:本文中的org.wso2.carbon.automation.engine.context.TestUserMode类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论