• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java Required类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.databene.contiperf.Required的典型用法代码示例。如果您正苦于以下问题:Java Required类的具体用法?Java Required怎么用?Java Required使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Required类属于org.databene.contiperf包,在下文中一共展示了Required类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: serviceDestroyApplicationSessionRequestSuccessTest

import org.databene.contiperf.Required; //导入依赖的package包/类
/**
 * Service destroy application session request success test.
 *
 * @throws Exception
 *             the exception
 */
@Test
@PerfTest(threads = 4, duration = 3000, warmUp = 1500)
@Required(max = 1000, average = 600, percentile95 = 850, throughput = 10)
public void serviceDestroyApplicationSessionRequestSuccessTest() throws Exception {

	setAuthenticatedAnonymousUser();
	final CreateApplicationSessionRequest createTestApplicationSession = createTestApplicationSession();

	final DestroyApplicationSessionRequest destroyApplicationSessionRequest = new DestroyApplicationSessionRequest();

	destroyApplicationSessionRequest.setSessionId(createTestApplicationSession.getSessionId());
	final ServiceResponse response = applicationManager.service(destroyApplicationSessionRequest);
	assertNotNull(EXPECT_A_RESULT,response);
	assertEquals(EXPECT_SUCCESS,ServiceResult.SUCCESS,response.getResult());

	final ApplicationSession applicationSession = applicationSessionDAO.findFirstByProperty(ApplicationSession_.sessionId, createTestApplicationSession.getSessionId());
	assertNotNull(EXPECT_A_RESULT,applicationSession);
	assertNotNull(EXPECT_A_RESULT,applicationSession.getDestroyedDate());
}
 
开发者ID:Hack23,项目名称:cia,代码行数:26,代码来源:DestroyApplicationSessionServiceITest.java


示例2: serviceRegisterUserRequestSuccessTest

import org.databene.contiperf.Required; //导入依赖的package包/类
/**
 * Service register user request success test.
 *
 * @throws Exception
 *             the exception
 */
@Test
@PerfTest(threads = 4, duration = 5000, warmUp = 1500)
@Required(max = 2000, average = 1200, percentile95 = 1500, throughput = 2)
public void serviceRegisterUserRequestSuccessTest() throws Exception {
	final CreateApplicationSessionRequest createApplicationSesstion = createApplicationSesstionWithRoleAnonymous();


	final RegisterUserRequest serviceRequest = new RegisterUserRequest();
	serviceRequest.setCountry("Sweden");
	serviceRequest.setUsername(UUID.randomUUID().toString());
	serviceRequest.setEmail(serviceRequest.getUsername() + "@email.com");
	serviceRequest.setUserpassword("Userpassword1!");
	serviceRequest.setUserType(UserType.PRIVATE);
	serviceRequest.setSessionId(createApplicationSesstion.getSessionId());

	final RegisterUserResponse response = (RegisterUserResponse) applicationManager.service(serviceRequest);
	assertNotNull(EXPECT_A_RESULT, response);
	assertEquals(EXPECT_SUCCESS,ServiceResult.SUCCESS, response.getResult());

	final DataContainer<UserAccount, Long> dataContainer = applicationManager.getDataContainer(UserAccount.class);
	final List<UserAccount> allBy = dataContainer.getAllBy(UserAccount_.username, serviceRequest.getUsername());
	assertEquals(1, allBy.size());
}
 
开发者ID:Hack23,项目名称:cia,代码行数:30,代码来源:RegisterUserServiceITest.java


示例3: testPing

import org.databene.contiperf.Required; //导入依赖的package包/类
@Test	
@PerfTest(invocations = 30000, threads = 300)
@Required(max = 10000, average = 600)
public void testPing() throws Exception {		
	String url = "http://localhost:9999/cmd/ping";
	String rs = HttpClientUtil.executeGet(url);
	
	if (rs.length()>3) {
		int c = validCount.incrementAndGet();
		System.out.println(c+" \n");			
	} else {
		System.out.println(rs);
		invalidCount.incrementAndGet();
		throw new IllegalArgumentException("Bad response!");
	}		
}
 
开发者ID:trieu,项目名称:netty-with-gradle,代码行数:17,代码来源:PerformanceTestHttpServer.java


示例4: allPass

import org.databene.contiperf.Required; //导入依赖的package包/类
@Test
@PerfTest(invocations = 10, rampUp = 1)
@Required(max = 20000, average = 10000)
public void allPass()
{
    verify(new ExpectedTable());
}
 
开发者ID:goldmansachs,项目名称:tablasco,代码行数:8,代码来源:TableVerifierPerformanceTest.java


示例5: brokenBalances

import org.databene.contiperf.Required; //导入依赖的package包/类
@Test(expected = AssertionError.class)
@PerfTest(invocations = 10, rampUp = 1)
@Required(max = 20000, average = 10000)
public void brokenBalances()
{
    verify(new BrokenBalances());
}
 
开发者ID:goldmansachs,项目名称:tablasco,代码行数:8,代码来源:TableVerifierPerformanceTest.java


示例6: partialMatch

import org.databene.contiperf.Required; //导入依赖的package包/类
@Test(expected = AssertionError.class)
@PerfTest(invocations = 10, rampUp = 1)
@Required(max = 20000, average = 10000)
public void partialMatch()
{
    verify(new PartiallyMatchable());
}
 
开发者ID:goldmansachs,项目名称:tablasco,代码行数:8,代码来源:TableVerifierPerformanceTest.java


示例7: testParsingOfSearchResultFile

import org.databene.contiperf.Required; //导入依赖的package包/类
@Test
@PerfTest(invocations = 100, threads = 2)
@Required(max = 2300, average = 1590)
public void testParsingOfSearchResultFile () throws IOException, Exception,URISyntaxException {
    File jsonFile = new File(TestJsonParser.class.getClassLoader().getSystemResource("TestJsonParser/history.list").toURI());
    Path jsonPath = jsonFile.toPath();
    LOG.info("The file is going to be read") ;
    List<String> searchResultLines = Files.readAllLines(jsonPath, Charset.forName("UTF-8")) ;
    int size = searchResultLines.size() ;
    LOG.info("The file is read =>" +size +" line(s)") ;
    StringBuffer fullText = new StringBuffer();
    int current = 0 ;
    TweetFromTuple simpleConstructor = new TweetFromTuple();
    for (String searchResultLine : searchResultLines ) {
        Tweet currentTweet = simpleConstructor.map(searchResultLine);
        String post_id = currentTweet.getTwitterName();
        String post_text = currentTweet.getTwittText();
        String post_geo = currentTweet.getGeo() ;
        String post_coordinate = currentTweet.getCoordinate() ;
        //System.out.println("original post =>" + searchResultLine);
        //System.out.println("post_id =>" + post_id);
        Assert.assertNotNull(post_id);
        Assert.assertNotNull(post_text);
        Assert.assertNotNull(post_geo);
        Assert.assertNotNull(post_coordinate);
        Assert.assertEquals(post_geo, Tweet.Default_Geo);
        Assert.assertEquals(post_coordinate, Tweet.Default_Coordinate);
    }

}
 
开发者ID:LaurentTardif,项目名称:AgileGrenoble2015,代码行数:31,代码来源:TestSearchResultParser.java


示例8: getBallotIdListTest

import org.databene.contiperf.Required; //导入依赖的package包/类
/**
 * Gets the ballot id list test.
 *
 * @return the ballot id list test
 */
@Test
@PerfTest(threads = 1, duration = 20000)
@Required(max = 20000,average = 15000,percentile95=18000)
public void getBallotIdListTest() {
	List<VoteDataEmbeddedId> ballotIdList = voteDataDAO.getBallotIdList();
	assertNotNull(ballotIdList);
	assertFalse(ballotIdList.isEmpty());
}
 
开发者ID:Hack23,项目名称:cia,代码行数:14,代码来源:VoteDataDAOITest.java


示例9: getIdListTest

import org.databene.contiperf.Required; //导入依赖的package包/类
/**
 * Gets the id list test.
 *
 * @return the id list test
 */
@Test
@PerfTest(threads = 1, duration = 20000)
@Required(max = 20000,average = 15000,percentile95=18000)
@Ignore
public void getIdListTest() {
	List<VoteDataEmbeddedId> ballotIdList = voteDataDAO.getIdList();
	assertNotNull(ballotIdList);
	assertFalse(ballotIdList.isEmpty());
}
 
开发者ID:Hack23,项目名称:cia,代码行数:15,代码来源:VoteDataDAOITest.java


示例10: getDataDefenceMinistrySuccessTest

import org.databene.contiperf.Required; //导入依赖的package包/类
/**
 * Gets the data defence ministry success test.
 *
 * @return the data defence ministry success test
 */
@Test
@PerfTest(threads = 1, duration = 3000, warmUp = 1500)
@Required(max = 1000, average = 800, percentile95 = 900, throughput = 2)
public void getDataDefenceMinistrySuccessTest() {
	final Map<Integer, List<GovernmentBodyAnnualSummary>> governmentBodyAnnualSummaryData = esvApi
			.getDataPerMinistry("Försvarsdepartementet");
	assertNotNull(governmentBodyAnnualSummaryData);
	assertEquals(18, governmentBodyAnnualSummaryData.size());
	for (final List<GovernmentBodyAnnualSummary> list : governmentBodyAnnualSummaryData.values()) {
		for (final GovernmentBodyAnnualSummary governmentBodyAnnualSummary : list) {
			assertNotNull(governmentBodyAnnualSummary);
		}
	}
}
 
开发者ID:Hack23,项目名称:cia,代码行数:20,代码来源:EsvApiTest.java


示例11: getDataFinanceMinistry1900FailureTest

import org.databene.contiperf.Required; //导入依赖的package包/类
/**
 * Gets the data finance ministry 1900 failure test.
 *
 * @return the data finance ministry 1900 failure test
 */
@Test
@PerfTest(threads = 1, duration = 3000, warmUp = 1500)
@Required(max = 1000, average = 800, percentile95 = 900, throughput = 2)
public void getDataFinanceMinistry1900FailureTest() {
	final List<GovernmentBodyAnnualSummary> list = esvApi.getDataPerMinistryAndYear("Finansdepartementet", 1900);
	assertNotNull(list);
	assertEquals(0, list.size());
}
 
开发者ID:Hack23,项目名称:cia,代码行数:14,代码来源:EsvApiTest.java


示例12: getDataFinanceMinistry1999SuccessTest

import org.databene.contiperf.Required; //导入依赖的package包/类
/**
 * Gets the data finance ministry 1999 success test.
 *
 * @return the data finance ministry 1999 success test
 */
@Test
@PerfTest(threads = 1, duration = 3000, warmUp = 1500)
@Required(max = 1000, average = 800, percentile95 = 900, throughput = 2)
public void getDataFinanceMinistry1999SuccessTest() {
	final List<GovernmentBodyAnnualSummary> list = esvApi.getDataPerMinistryAndYear("Finansdepartementet", 1999);
	assertNotNull(list);
	assertEquals(42, list.size());
	for (final GovernmentBodyAnnualSummary governmentBodyAnnualSummary : list) {
		assertNotNull(governmentBodyAnnualSummary);
	}
}
 
开发者ID:Hack23,项目名称:cia,代码行数:17,代码来源:EsvApiTest.java


示例13: getDataFinanceMinistry2016SuccessTest

import org.databene.contiperf.Required; //导入依赖的package包/类
/**
 * Gets the data finance ministry 2016 success test.
 *
 * @return the data finance ministry 2016 success test
 */
@Test
@PerfTest(threads = 1, duration = 3000, warmUp = 1500)
@Required(max = 1000, average = 800, percentile95 = 900, throughput = 2)
public void getDataFinanceMinistry2016SuccessTest() {
	final List<GovernmentBodyAnnualSummary> list = esvApi.getDataPerMinistryAndYear("Finansdepartementet", 2016);
	assertNotNull(list);
	assertEquals(45, list.size());
	for (final GovernmentBodyAnnualSummary governmentBodyAnnualSummary : list) {
		assertNotNull(governmentBodyAnnualSummary);
	}
}
 
开发者ID:Hack23,项目名称:cia,代码行数:17,代码来源:EsvApiTest.java


示例14: getDataFinanceMinistrySuccessTest

import org.databene.contiperf.Required; //导入依赖的package包/类
/**
 * Gets the data finance ministry success test.
 *
 * @return the data finance ministry success test
 */
@Test
@PerfTest(threads = 1, duration = 3000, warmUp = 1500)
@Required(max = 1000, average = 800, percentile95 = 900, throughput = 2)
public void getDataFinanceMinistrySuccessTest() {
	final Map<Integer, List<GovernmentBodyAnnualSummary>> governmentBodyAnnualSummaryData = esvApi
			.getDataPerMinistry("Finansdepartementet");
	assertNotNull(governmentBodyAnnualSummaryData);
	assertEquals(18, governmentBodyAnnualSummaryData.size());
	for (final List<GovernmentBodyAnnualSummary> list : governmentBodyAnnualSummaryData.values()) {
		for (final GovernmentBodyAnnualSummary governmentBodyAnnualSummary : list) {
			assertNotNull(governmentBodyAnnualSummary);
		}
	}
}
 
开发者ID:Hack23,项目名称:cia,代码行数:20,代码来源:EsvApiTest.java


示例15: getDataForeignMinistrySuccessTest

import org.databene.contiperf.Required; //导入依赖的package包/类
/**
 * Gets the data foreign ministry success test.
 *
 * @return the data foreign ministry success test
 */
@Test
@PerfTest(threads = 1, duration = 3000, warmUp = 1500)
@Required(max = 1000, average = 800, percentile95 = 900, throughput = 2)
public void getDataForeignMinistrySuccessTest() {
	final Map<Integer, List<GovernmentBodyAnnualSummary>> governmentBodyAnnualSummaryData = esvApi
			.getDataPerMinistry("Utrikesdepartementet");
	assertNotNull(governmentBodyAnnualSummaryData);
	assertEquals(18, governmentBodyAnnualSummaryData.size());
	for (final List<GovernmentBodyAnnualSummary> list : governmentBodyAnnualSummaryData.values()) {
		for (final GovernmentBodyAnnualSummary governmentBodyAnnualSummary : list) {
			assertNotNull(governmentBodyAnnualSummary);
		}
	}
}
 
开发者ID:Hack23,项目名称:cia,代码行数:20,代码来源:EsvApiTest.java


示例16: getDataPerGovernmentBodySuccessTest

import org.databene.contiperf.Required; //导入依赖的package包/类
/**
 * Gets the data per government body success test.
 *
 * @return the data per government body success test
 */
@Test
@PerfTest(threads = 1, duration = 3000, warmUp = 1500)
@Required(max = 1000, average = 800, percentile95 = 900, throughput = 2)
public void getDataPerGovernmentBodySuccessTest() {
	final Map<Integer, GovernmentBodyAnnualSummary> governmentBodyAnnualSummaryData = esvApi
			.getDataPerGovernmentBody("Exportkreditnämnden");
	assertNotNull(governmentBodyAnnualSummaryData);
	assertEquals(18, governmentBodyAnnualSummaryData.size());
	for (final GovernmentBodyAnnualSummary governmentBodyAnnualSummary : governmentBodyAnnualSummaryData.values()) {
		assertNotNull(governmentBodyAnnualSummary);
	}
}
 
开发者ID:Hack23,项目名称:cia,代码行数:18,代码来源:EsvApiTest.java


示例17: getDataSuccessTest

import org.databene.contiperf.Required; //导入依赖的package包/类
/**
 * Gets the data success test.
 *
 * @return the data success test
 */
@Test
@PerfTest(threads = 1, duration = 3000, warmUp = 1500)
@Required(max = 1000, average = 800, percentile95 = 900, throughput = 2)
public void getDataSuccessTest() {
	final Map<Integer, List<GovernmentBodyAnnualSummary>> governmentBodyAnnualSummaryData = esvApi.getData();
	assertNotNull(governmentBodyAnnualSummaryData);
	assertEquals(18, governmentBodyAnnualSummaryData.size());
	for (final List<GovernmentBodyAnnualSummary> list : governmentBodyAnnualSummaryData.values()) {
		assertTrue(list.size() > 200);
		for (final GovernmentBodyAnnualSummary governmentBodyAnnualSummary : list) {
			assertNotNull(governmentBodyAnnualSummary);
		}
	}
}
 
开发者ID:Hack23,项目名称:cia,代码行数:20,代码来源:EsvApiTest.java


示例18: getGovernmentBodyNamesSuccessTest

import org.databene.contiperf.Required; //导入依赖的package包/类
/**
 * Gets the government body names success test.
 *
 * @return the government body names success test
 */
@Test
@PerfTest(threads = 2, duration = 3000, warmUp = 1500)
@Required(max = 1000, average = 20, percentile95 = 50, throughput = 50)
public void getGovernmentBodyNamesSuccessTest() {
	final List<String> list = esvApi.getGovernmentBodyNames();
	assertNotNull(list);
	assertEquals(326, list.size());
}
 
开发者ID:Hack23,项目名称:cia,代码行数:14,代码来源:EsvApiTest.java


示例19: getMinistryNamesSuccessTest

import org.databene.contiperf.Required; //导入依赖的package包/类
/**
 * Gets the ministry names success test.
 *
 * @return the ministry names success test
 */
@Test
@PerfTest(threads = 2, duration = 3000, warmUp = 1500)
@Required(max = 1000, average = 20, percentile95 = 50, throughput = 50)
public void getMinistryNamesSuccessTest() {
	final List<String> list = esvApi.getMinistryNames();
	assertNotNull(list);
	assertEquals(16, list.size());
}
 
开发者ID:Hack23,项目名称:cia,代码行数:14,代码来源:EsvApiTest.java


示例20: getGovernmentBodyNamesForeignMinistrySuccessTest

import org.databene.contiperf.Required; //导入依赖的package包/类
/**
 * Gets the government body names foreign ministry success test.
 *
 * @return the government body names foreign ministry success test
 */
@Test
@PerfTest(threads = 1, duration = 3000, warmUp = 1500)
@Required(max = 1000, average = 40, percentile95 = 50, throughput = 50)
public void getGovernmentBodyNamesForeignMinistrySuccessTest() {
	final List<String> list = esvApi.getGovernmentBodyNames("Utrikesdepartementet");
	assertNotNull(list);
	assertEquals(14, list.size());
}
 
开发者ID:Hack23,项目名称:cia,代码行数:14,代码来源:EsvApiTest.java



注:本文中的org.databene.contiperf.Required类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java LifecycleListener类代码示例发布时间:2022-05-22
下一篇:
Java EMFileMessageBody类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap