Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
c938d5734b
|
@ -92,16 +92,19 @@ public class HBasePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get style, read according to rowKey
|
* get style, read according to rowKey
|
||||||
|
*
|
||||||
* @param rowkey
|
* @param rowkey
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
@Behavior(value = "Get", type = BehaviorType.USER_BEHAVIOR)
|
@Behavior(value = "Get", type = BehaviorType.USER_BEHAVIOR)
|
||||||
public HBaseReturn get(@Parameter(value = "rowkey", type = SupportTypes.Field) String rowkey) {
|
public HBaseReturn get(
|
||||||
|
@Parameter(value = "rowkey", type = SupportTypes.Field) String rowkey) {
|
||||||
try {
|
try {
|
||||||
Get g = new Get(Bytes.toBytes(rowkey));
|
Get g = new Get(Bytes.toBytes(rowkey));
|
||||||
Result r = tableUnderTest.get(g);
|
Result r = tableUnderTest.get(g);
|
||||||
for(KeyValue kv : r.raw()){
|
for (KeyValue kv : r.raw()) {
|
||||||
System.out.println("column: " + new String(kv.getRow()));
|
System.out.println("column: " + new String(kv.getRow()));
|
||||||
System.out.println("value: " + new String(kv.getValue()));
|
System.out.println("value: " + new String(kv.getValue()));
|
||||||
}
|
}
|
||||||
|
@ -112,18 +115,21 @@ public class HBasePlugin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Perform a range scan for a set of records in the database.
|
* Perform a range scan for a set of records in the database.
|
||||||
* @param startkey The record key of the first record to read.
|
*
|
||||||
* @param recordcount The number of records to read
|
* @param startkey
|
||||||
|
* The record key of the first record to read.
|
||||||
|
* @param recordcount
|
||||||
|
* The number of records to read
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
@Behavior(value = "Scan", type = BehaviorType.USER_BEHAVIOR)
|
@Behavior(value = "Scan", type = BehaviorType.USER_BEHAVIOR)
|
||||||
public HBaseReturn scan(@Parameter(value = "startkey", type = SupportTypes.Field) String startkey,
|
public HBaseReturn scan(
|
||||||
@Parameter(value = "recordcount", type = SupportTypes.Field) String recordcount)
|
@Parameter(value = "startkey", type = SupportTypes.Field) String startkey,
|
||||||
{
|
@Parameter(value = "recordcount", type = SupportTypes.Field) String recordcount) {
|
||||||
Scan s = new Scan(Bytes.toBytes(startkey));
|
Scan s = new Scan(Bytes.toBytes(startkey));
|
||||||
Integer count = Integer.getInteger(recordcount);
|
Integer count = Integer.getInteger(recordcount);
|
||||||
s.setCaching(count);
|
s.setCaching(count);
|
||||||
|
@ -131,24 +137,22 @@ public class HBasePlugin {
|
||||||
try {
|
try {
|
||||||
scanner = tableUnderTest.getScanner(s);
|
scanner = tableUnderTest.getScanner(s);
|
||||||
int numResults = 0;
|
int numResults = 0;
|
||||||
for (Result rr = scanner.next(); rr != null; rr = scanner.next())
|
for (Result rr = scanner.next(); rr != null; rr = scanner.next()) {
|
||||||
{
|
|
||||||
|
|
||||||
String key = Bytes.toString(rr.getRow());
|
|
||||||
for (KeyValue kv : rr.raw()) {
|
for (KeyValue kv : rr.raw()) {
|
||||||
System.out.println("result: key =" + kv.getQualifier() + " value = " + kv.getValue());
|
System.out.println("result: key =" + kv.getQualifier()
|
||||||
|
+ " value = " + kv.getValue());
|
||||||
}
|
}
|
||||||
numResults++;
|
numResults++;
|
||||||
if (numResults >= count)
|
if (numResults >= count) {
|
||||||
{
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Logger.getLogger(HBasePlugin.class).info(e, e);
|
Logger.getLogger(HBasePlugin.class).info(e, e);
|
||||||
return new HBaseReturn(false);
|
return new HBaseReturn(false);
|
||||||
}finally {
|
} finally {
|
||||||
scanner.close();
|
scanner.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,32 +3,32 @@
|
||||||
<ui>
|
<ui>
|
||||||
<plugin name="CsvProvider">
|
<plugin name="CsvProvider">
|
||||||
<params>
|
<params>
|
||||||
<param name="fileName" label="The name of the input file(Required)">
|
<param name="fileName" label="The name of the input file" required="true">
|
||||||
<file />
|
<file />
|
||||||
</param>
|
</param>
|
||||||
<param name="separator"
|
<param name="separator"
|
||||||
label="The separator of the input file and the following fieldNames">
|
label="The separator of the input file and the following fieldNames" required="true">
|
||||||
<field size="7" />
|
<field size="7" />
|
||||||
</param>
|
</param>
|
||||||
<param name="fieldNames" label="fields names:">
|
<param name="fieldNames" label="fields names:" required="true">
|
||||||
<nfield />
|
<nfield />
|
||||||
</param>
|
</param>
|
||||||
<param name="shared" label="to share the file descriptor">
|
<param name="shared" label="to share the file descriptor" required="false">
|
||||||
<checkbox>
|
<checkbox>
|
||||||
<choice value="enable" default="false" />
|
<choice value="enable" default="false" />
|
||||||
</checkbox>
|
</checkbox>
|
||||||
</param>
|
</param>
|
||||||
<param name="loop" label="when to the EOF, is in loop">
|
<param name="loop" label="when to the EOF, is in loop" required="false">
|
||||||
<checkbox>
|
<checkbox>
|
||||||
<choice value="enable" default="true" />
|
<choice value="enable" default="true" />
|
||||||
</checkbox>
|
</checkbox>
|
||||||
</param>
|
</param>
|
||||||
<param name="loadAtRuntime" label="is to load it at runtime">
|
<param name="loadAtRuntime" label="is to load it at runtime" required="true">
|
||||||
<checkbox>
|
<checkbox>
|
||||||
<choice value="loadAtRuntime" default="true" />
|
<choice value="loadAtRuntime" default="true" />
|
||||||
</checkbox>
|
</checkbox>
|
||||||
</param>
|
</param>
|
||||||
<param name="commentPrefix" label="perfix of the commnet">
|
<param name="commentPrefix" label="perfix of the commnet" required="false">
|
||||||
<nfield></nfield>
|
<nfield></nfield>
|
||||||
</param>
|
</param>
|
||||||
</params>
|
</params>
|
||||||
|
|
|
@ -227,6 +227,9 @@ public class RunningAgentDB implements RunningAgentInterface {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TestBriefStatusModel briefAll() {
|
public TestBriefStatusModel briefAll() {
|
||||||
|
if (this.isStoped()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
return this.getAgentMessenger().scriptBriefAll(this.getAgent(),
|
return this.getAgentMessenger().scriptBriefAll(this.getAgent(),
|
||||||
this.getAgentRunId());
|
this.getAgentRunId());
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 3.3 KiB |
|
@ -1,6 +1,6 @@
|
||||||
<div id="recordProxy-toolbar" style="margin: 0 0 0 0 !important;padding: 0 0 0 0 !important;z-index: 1000000;position: fixed;top: -3px;_position: absolute;_top: expression(eval(document.body.scrollTop-3));height: 40px;border: solid #fff 3px;background: #115822;filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#196630', endColorstr='#004811'); background: -webkit-gradient(linear,left top,left bottom,from(#61b0df),to(#369bd7));background: -moz-linear-gradient(#61b0df, #369bd7);background: -o-linear-gradient(top,#61b0df,#369bd7);background:linear-gradient(#61b0df, #369bd7);border-radius: 0px 0px 10px 10px">
|
<div id="recordProxy-toolbar" style="margin: 0 0 0 0 !important;padding: 0 0 0 0 !important;z-index: 1000000;position: fixed;top: -3px;_position: absolute;_top: expression(eval(document.body.scrollTop-3));height: 40px;border: solid #fff 3px;background: #115822;filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#196630', endColorstr='#004811'); background: -webkit-gradient(linear,left top,left bottom,from(#61b0df),to(#369bd7));background: -moz-linear-gradient(#61b0df, #369bd7);background: -o-linear-gradient(top,#61b0df,#369bd7);background:linear-gradient(#61b0df, #369bd7);border-radius: 0px 0px 10px 10px">
|
||||||
<div id="recordProxy-toolbar-content" style=" vertical-align: top;overflow: hidden;display: block;width: 175px;height: 38px;background: url('bench4q.png') no-repeat 10px 10px">
|
<div id="recordProxy-toolbar-content" style=" vertical-align: top;overflow: hidden;display: block;width: 175px;height: 38px;background: url('data:image/png;base64,iVBORw0KGgoAAA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I0ez3H2xA9sR0uiYEF3HZyypkGflrbZRk/snlo+dKcr/IpJBcwRg+aE/DYTZnfNry+Gu3herSH6iBGb13q2rrOh8OtDdhUG4BWKMBNDejYsgYtG2uwYYUHKTWH0NoAdjevhpdmSTB0bGuswY6mWjM4R6D8y0n/B3+P7z8B/ALrRzPBQ2Vs6QAAAABJRU5ErkJggg==') no-repeat 10px 10px">
|
||||||
<a class="recordProxy-button" style="margin: 7px 5px;display: inline-block;background: #F3F3F3;filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#c4c4c4');background: -webkit-gradient(linear, 0% 0%, 0% 170%, from(white), to(#C4C4C4));background: -moz-linear-gradient(0% 170% 90deg, #C4C4C4, white);background: -o-linear-gradient(0% 170% 90deg, #C4C4C4, white);color: #404040 !important;font: 12px/12px 'Helvetica Neue', Helvetica, Arial, sans-serif;text-align: center;text-decoration: none;text-shadow: 1px 1px 0 white;white-space: nowrap;outline: 0;padding: 5px 8px 5px;border: 1px solid;-moz-border-radius: 3px;-webkit-border-radius: 3px;-o-border-radius: 3px;border-radius: 3px;border-color: #E6E6E6 #CCC #CCC #E6E6E6;margin-left: 40px" onclick="alert('请返回bench4q进行操作')" href="#">正在录制脚本</a>
|
<a class="recordProxy-button" style="margin: 7px 5px;display: inline-block;background: #F3F3F3;filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#c4c4c4');background: -webkit-gradient(linear, 0% 0%, 0% 170%, from(white), to(#C4C4C4));background: -moz-linear-gradient(0% 170% 90deg, #C4C4C4, white);background: -o-linear-gradient(0% 170% 90deg, #C4C4C4, white);color: #404040 !important;font: 12px/12px 'Helvetica Neue', Helvetica, Arial, sans-serif;text-align: center;text-decoration: none;text-shadow: 1px 1px 0 white;white-space: nowrap;outline: 0;padding: 5px 8px 5px;border: 1px solid;-moz-border-radius: 3px;-webkit-border-radius: 3px;-o-border-radius: 3px;border-radius: 3px;border-color: #E6E6E6 #CCC #CCC #E6E6E6;margin-left: 40px" onclick="alert('请返回bench4q进行操作')" href="#">正在录制脚本</a>
|
||||||
<a class="recordProxy-indicator" style="cursor: default;vertical-align: top;text-decoration: none;display: inline-block;width: 22px;height: 22px;margin-top: 8px;background: url('recordProxy.png') no-repeat top left;border: none" onclick="return false;" href="#"> </a>
|
<a class="recordProxy-indicator" style="cursor: default;vertical-align: top;text-decoration: none;display: inline-block;width: 22px;height: 22px;margin-top: 8px;background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA6dJREFUeNrUlV9oW3UUx8/v3iQ3ubk3q0mXm2xZa0oximKXtqNOBhMq60NQoeCzjO1pVAWh4FsJTFAfJqgMffBpjz7JGHtYCzoYdC6YqW2Zbik1XZubJQ1dbnJzc//9PL+2YV3/yR724IEvv5vfPb9PTs7vnBNCKYXnYRw8J/Mc9JIQwuMSQvmZZABBA2jjs7GlOv5i55nACJUQdOR7gPfjhJwWAQZ4Sg87hDxqAfz+kNKfLwD8iH4qwhu7zu+VY0mSlI8BXn9H1789PDTU253JCL6eHvB0d4O9tgbm8jJUb9xoV27dWvxJFD/6BuDPRqNRPhCcTCa7JqvVsTds+4cXJyZE6eRJ0i6VwKnXwWk2gRME4INBEI4eBX1ujv5z6ZL+C8d98HU0Ol0oFB7vCR4eHvb263rqk3v3Zl7OZqOeWAxa9+8DtW0A5sfkugCOA5QQEFMpcNbX4a9sVv0ilXp7KRD4O5fLWbuqQlGUyIVC4dMjmUzYixE183lwNbwuw3iidntTGH0zlwNvJALK6GhkYnFxUpblyJ7lFgqF/EHLejdy5oxHv3sXQNf3hFK2miZAqwXa9DREBga8kmm+F4vF/LvA2WzW81axGPceOiRwgQDY5TJQPLgdSnBlopUK2AsLYN6+DQaKcBx4BEF8c2Ulyjg7y83Xs7z8ihiP29b8vM8uFICXpI3LoiyvLEIGrdXAtSxgd0Nwn8NcO7gnJRJO/9LSa78CzCHL3g52iSxrFsspHnSxEgAjoSgWEdbrphDIsX1c2bW7CCc+H1iGQTGXdba1M8dmc2xswVBVge/qAs7rfQJDcZ0v4PnN584++vGhELRWV33VTGaecZ4CT01NueTUqccYSdnC/Ap9fRsHYQd8O5S9Y37MH3h+NTgyojHOrqoYHx9/6PT1fbZy7ZoRHBoCDhvhqai31PnMGiUwOAgr168bZjL5eTgcbhzY0r/J8oySTp9+4cQJvjU7C46qAocp2IgSjV0mpyjgHxmB9Tt3HDWfnyE3b55Np9Ml9nrfITSoaaN5v3+hpapJbBa/i/Xs4oygjQZwsgwcNgURRShdvWpoxeJi8OLFyVQ6Xe1A9424Y3/09n5Jy+UP5f5+GozHBV84zJm1mquXSu36gweEKMpXL83Ofld1nEoikWj953TbbpXLl4+vXbly3CwW09BovIoRz3mOHcuHz53LR8+fX0WXWqfEngmMxoa9wBpI0zQPzgN7q6TYwHf2nef/u/+8fwUYAGyMtUnmcOi+AAAAAElFTkSuQmCC') no-repeat top left;border: none" onclick="return false;" href="#"> </a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
Binary file not shown.
Before Width: | Height: | Size: 1.0 KiB |
|
@ -10,7 +10,6 @@ import javax.xml.bind.JAXBException;
|
||||||
|
|
||||||
import org.bench4q.master.domain.RunningAgentInterface;
|
import org.bench4q.master.domain.RunningAgentInterface;
|
||||||
import org.bench4q.master.domain.entity.Agent;
|
import org.bench4q.master.domain.entity.Agent;
|
||||||
import org.bench4q.master.domain.entity.RunningAgentDB;
|
|
||||||
import org.bench4q.master.domain.factory.RunningAgentFactory;
|
import org.bench4q.master.domain.factory.RunningAgentFactory;
|
||||||
import org.bench4q.master.domain.valueobject.datastatistics.RunningScriptSampler;
|
import org.bench4q.master.domain.valueobject.datastatistics.RunningScriptSampler;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
@ -30,13 +29,29 @@ public class Test_ScriptSample {
|
||||||
testcase2.add(Agent.createAgentWithoutId("127.0.0.2", 6565, 500));
|
testcase2.add(Agent.createAgentWithoutId("127.0.0.2", 6565, 500));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The destiny is to justify if a runningAgent is stopped, if it will
|
||||||
|
* decrease the totalSuccessCount
|
||||||
|
*
|
||||||
|
* @throws JAXBException
|
||||||
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void test() throws JAXBException {
|
public void testForStopOneRunningAgentWhenSample() throws JAXBException {
|
||||||
ArrayList<RunningAgentInterface> runningAgents = new ArrayList<RunningAgentInterface>();
|
ArrayList<RunningAgentInterface> runningAgents = new ArrayList<RunningAgentInterface>();
|
||||||
runningAgents.add(this.runningAgentFactory
|
runningAgents.add(this.runningAgentFactory
|
||||||
.buildRunningAgentWithOutIdAndRunningScript(
|
.buildRunningAgentWithOutIdAndRunningScript(
|
||||||
this.testcase2.get(0), 10, UUID.randomUUID()));
|
this.testcase2.get(0), 10, UUID.randomUUID()));
|
||||||
|
runningAgents.add(this.runningAgentFactory
|
||||||
|
.buildRunningAgentWithOutIdAndRunningScript(
|
||||||
|
this.testcase2.get(1), 20, UUID.randomUUID()));
|
||||||
RunningScriptSampler sampler = new RunningScriptSampler(runningAgents);
|
RunningScriptSampler sampler = new RunningScriptSampler(runningAgents);
|
||||||
assertNotNull(sampler.getResultModelFromAgent());
|
long totalSuccessCountBeforeStop = sampler.getResultModelFromAgent()
|
||||||
|
.getScriptBriefResultModel().getTotalSuccessCountFromBegin();
|
||||||
|
|
||||||
|
runningAgents.get(0).stop();
|
||||||
|
|
||||||
|
long totalSuccessCountAfterStop = sampler.getResultModelFromAgent()
|
||||||
|
.getScriptBriefResultModel().getTotalSuccessCountFromBegin();
|
||||||
|
assertTrue(totalSuccessCountAfterStop >= totalSuccessCountBeforeStop);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
package stubs;
|
package stubs;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import org.bench4q.master.domain.entity.Agent;
|
import org.bench4q.master.domain.entity.Agent;
|
||||||
import org.bench4q.master.infrastructure.communication.AgentMessenger;
|
import org.bench4q.master.infrastructure.communication.AgentMessenger;
|
||||||
import org.bench4q.share.enums.master.AgentStatus;
|
import org.bench4q.share.enums.master.AgentStatus;
|
||||||
|
import org.bench4q.share.models.agent.BehaviorBriefModel;
|
||||||
import org.bench4q.share.models.agent.RunScenarioModel;
|
import org.bench4q.share.models.agent.RunScenarioModel;
|
||||||
import org.bench4q.share.models.agent.RunScenarioResultModel;
|
import org.bench4q.share.models.agent.RunScenarioResultModel;
|
||||||
import org.bench4q.share.models.agent.ServerStatusModel;
|
import org.bench4q.share.models.agent.ServerStatusModel;
|
||||||
|
@ -41,13 +43,25 @@ public class Mock_AgentMessenger implements AgentMessenger {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TestBriefStatusModel scriptBriefAll(Agent agent, UUID runId) {
|
public TestBriefStatusModel scriptBriefAll(Agent agent, UUID runId) {
|
||||||
|
if (isDead(agent)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
TestBriefStatusModel result = new TestBriefStatusModel();
|
TestBriefStatusModel result = new TestBriefStatusModel();
|
||||||
result.setScenarioBriefModel(new AgentBriefStatusModel());
|
AgentBriefStatusModel scenarioBriefModel = new AgentBriefStatusModel();
|
||||||
|
scenarioBriefModel.setSuccessCountFromBegin(1000);
|
||||||
|
result.setScenarioBriefModel(scenarioBriefModel);
|
||||||
result.setPagesBriefModel(new AgentPagesBriefModel());
|
result.setPagesBriefModel(new AgentPagesBriefModel());
|
||||||
result.setBehaviorsBriefModel(new AgentBehaviorsBriefModel());
|
AgentBehaviorsBriefModel behaviorsBriefModel = new AgentBehaviorsBriefModel();
|
||||||
|
behaviorsBriefModel
|
||||||
|
.setBehaviorBriefModels(new ArrayList<BehaviorBriefModel>());
|
||||||
|
result.setBehaviorsBriefModel(behaviorsBriefModel);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean isDead(Agent agent) {
|
||||||
|
return agent.getCurrentEnumStatus() == AgentStatus.BreakDown;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public StopTestModel stop(Agent agent, UUID runId) {
|
public StopTestModel stop(Agent agent, UUID runId) {
|
||||||
// if (runId == this.testId) {
|
// if (runId == this.testId) {
|
||||||
|
|
|
@ -1,27 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<classpath>
|
|
||||||
<classpathentry kind="src" output="target/classes" path="src/main/java">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="optional" value="true"/>
|
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="optional" value="true"/>
|
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="src" path="src/main/resource"/>
|
|
||||||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="output" path="target/classes"/>
|
|
||||||
</classpath>
|
|
|
@ -1,23 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<projectDescription>
|
|
||||||
<name>bench4q-recorder</name>
|
|
||||||
<comment></comment>
|
|
||||||
<projects>
|
|
||||||
</projects>
|
|
||||||
<buildSpec>
|
|
||||||
<buildCommand>
|
|
||||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
</buildCommand>
|
|
||||||
<buildCommand>
|
|
||||||
<name>org.eclipse.m2e.core.maven2Builder</name>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
</buildCommand>
|
|
||||||
</buildSpec>
|
|
||||||
<natures>
|
|
||||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
|
||||||
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
|
||||||
</natures>
|
|
||||||
</projectDescription>
|
|
|
@ -6,7 +6,6 @@ import java.nio.charset.Charset;
|
||||||
import java.util.StringTokenizer;
|
import java.util.StringTokenizer;
|
||||||
|
|
||||||
import org.apache.commons.httpclient.ChunkedInputStream;
|
import org.apache.commons.httpclient.ChunkedInputStream;
|
||||||
import org.apache.commons.httpclient.ChunkedOutputStream;
|
|
||||||
import org.apache.commons.io.output.ByteArrayOutputStream;
|
import org.apache.commons.io.output.ByteArrayOutputStream;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
|
@ -175,7 +174,7 @@ public class ResponseParser {
|
||||||
|
|
||||||
chunkedIS = new ChunkedInputStream(in);
|
chunkedIS = new ChunkedInputStream(in);
|
||||||
int tempByte;
|
int tempByte;
|
||||||
while ((tempByte = chunkedIS.read()) != -1){
|
while ((tempByte = chunkedIS.read()) != -1) {
|
||||||
out.write(tempByte);
|
out.write(tempByte);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -188,7 +187,7 @@ public class ResponseParser {
|
||||||
if (chunkedIS != null) {
|
if (chunkedIS != null) {
|
||||||
chunkedIS.close();
|
chunkedIS.close();
|
||||||
}
|
}
|
||||||
if(out != null){
|
if (out != null) {
|
||||||
out.close();
|
out.close();
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package org.bench4q.recorder;
|
package org.bench4q.recorder;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.ServerSocket;
|
|
||||||
|
|
||||||
import org.apache.commons.httpclient.HostConfiguration;
|
import org.apache.commons.httpclient.HostConfiguration;
|
||||||
import org.apache.commons.httpclient.HttpClient;
|
import org.apache.commons.httpclient.HttpClient;
|
||||||
|
@ -15,6 +14,7 @@ import org.junit.Test;
|
||||||
|
|
||||||
public class Test_RequestHandler {
|
public class Test_RequestHandler {
|
||||||
private static final int PORT = 8910;
|
private static final int PORT = 8910;
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void test() {
|
public void test() {
|
||||||
try {
|
try {
|
||||||
|
@ -34,6 +34,8 @@ public class Test_RequestHandler {
|
||||||
|
|
||||||
private static class SendRequest implements Runnable {
|
private static class SendRequest implements Runnable {
|
||||||
private HttpClient httpClient = new HttpClient();
|
private HttpClient httpClient = new HttpClient();
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public void run() {
|
public void run() {
|
||||||
HostConfiguration hostConfiguration = new HostConfiguration();
|
HostConfiguration hostConfiguration = new HostConfiguration();
|
||||||
hostConfiguration.setProxy("127.0.0.1", PORT);
|
hostConfiguration.setProxy("127.0.0.1", PORT);
|
||||||
|
|
|
@ -59,7 +59,7 @@ ContainerFactory.prototype.appendEdtiors = function(container, label, name, requ
|
||||||
|
|
||||||
} else if (editorInfo.type.toLowerCase() == "file") {
|
} else if (editorInfo.type.toLowerCase() == "file") {
|
||||||
$(container).append(
|
$(container).append(
|
||||||
editorFactory.createFile(lable, name, required, editorInfo.size, id,value));
|
editorFactory.createFile(label, name, required, editorInfo.size, id,value));
|
||||||
} else if (editorInfo.type.toLowerCase() == "date") {
|
} else if (editorInfo.type.toLowerCase() == "date") {
|
||||||
$(container).append(
|
$(container).append(
|
||||||
editorFactory.createDate(label, name, required, editorInfo.size, id,value));
|
editorFactory.createDate(label, name, required, editorInfo.size, id,value));
|
||||||
|
|
Loading…
Reference in New Issue