This commit is contained in:
coderfengyun 2014-01-07 17:32:57 +08:00
parent c956248fce
commit 42e42d3c62
1 changed files with 8 additions and 2 deletions

View File

@ -1,5 +1,6 @@
package org.bench4q.master.test.testplan;
import static org.junit.Assert.*;
import java.io.IOException;
import java.io.StringWriter;
import java.util.ArrayList;
@ -18,6 +19,7 @@ import org.bench4q.share.communication.HttpRequester;
import org.bench4q.share.communication.HttpRequester.HttpResponse;
import org.bench4q.share.enums.master.TestPlanStatus;
import org.bench4q.share.helper.MarshalHelper;
import org.bench4q.share.models.master.MonitorLogicalDiskResponseModel;
import org.bench4q.share.models.master.RunningScriptModel;
import org.bench4q.share.models.master.TestPlanBusinessModel;
import org.bench4q.share.models.master.TestPlanResultModel;
@ -236,7 +238,7 @@ public class TestPlanTester extends TestBase_MakeUpTestPlan {
}
public void getMonitorBrief(UUID testPlanID, String hostName, String port)
throws IOException, InterruptedException {
throws IOException, InterruptedException, JAXBException {
for (int i = 0; i < 2; i++) {
getMonitorMemoryResult(testPlanID, hostName, port);
getProcessorResult(testPlanID, hostName, port);
@ -259,13 +261,17 @@ public class TestPlanTester extends TestBase_MakeUpTestPlan {
}
private void getLogicalDiskResult(UUID testPlanID, String hostName,
String port) throws IOException {
String port) throws IOException, JAXBException {
HttpResponse httpResponse = this.httpRequester.sendGet(
TestBase.BASE_URL
+ "/monitorController/logicDiskMonitorSUTInfo/"
+ testPlanID.toString() + "/" + hostName + "/6565/0",
null, this.createAccessTokenMap());
System.out.println(httpResponse.getContent());
MonitorLogicalDiskResponseModel logicalDiskResponseModel = (MonitorLogicalDiskResponseModel) MarshalHelper
.unmarshal(MonitorLogicalDiskResponseModel.class,
httpResponse.getContent());
assertNotNull(logicalDiskResponseModel);
}
private void getNetworkInterfaceResult(UUID testPlanID, String hostName,