51Testing软件测试论坛
标题:
java.util.ConcurrentModificationException 异常,请帮忙
[打印本页]
作者:
凤凰山
时间:
2010-8-11 17:07
标题:
java.util.ConcurrentModificationException 异常,请帮忙
各位大侠,小弟在使用loadrunner测试用java 写的脚本时,遇到异常,我的action里的方法如下:
public int action() throws Throwable {
Map request = new HashMap();
// Map request = new ConcurrentHashMap();
//Map control =new ConcurrentHashMap();
Map control= new HashMap();
String partid=RandomStringUtils.random(14, false, true);//数字
String name=RandomStringUtils.random(8, true, false);//字母
String language=RandomStringUtils.random(3, false, true);
String local=RandomStringUtils.random(3, true, false);
control.put("requestId", "<requestID>");//参数化
control.put("requesterLocale", local);
control.put("requesterLanguage", language);
control.put("requesterName", name);
//control.put("pageStartIndex", "1");
//control.put("pageEndIndex", "2");
//request.put("**Id", partid);
request.put("control", control);
request.put("version", "1.0");
request.put("inquiryLevel", new Integer(2));
request.put("idTpCd", "<idtpcd>");
request.put("refNum", "<refNum>");
request.put("contactName", "<contactname>");
request.put(TRADE_CODE, "ecif.getPersonByCondition");
request.put("version", "1");
System.out.println("===========ecif.getPersonByCondition=========");
lr.start_transaction("my request");
tp.submit(request);
lr.end_transaction("my request", lr.AUTO);
return 0;
}//end of action
在controler里面运行时就老报java.util.ConcurrentModificationException ,请高手指点
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2