mirror of https://github.com/apache/jclouds.git
Also updated CloudWatchAsyncClientTest
This commit is contained in:
parent
b15db13574
commit
2aec451f1c
|
@ -62,21 +62,21 @@ public class CloudWatchAsyncClientTest extends RestClientTest<CloudWatchAsyncCli
|
||||||
public void testRegisterInstancesWithMeasure() throws SecurityException, NoSuchMethodException, IOException {
|
public void testRegisterInstancesWithMeasure() throws SecurityException, NoSuchMethodException, IOException {
|
||||||
Date date = new Date(10000000l);
|
Date date = new Date(10000000l);
|
||||||
Method method = CloudWatchAsyncClient.class.getMethod("getMetricStatisticsInRegion", String.class, String.class,
|
Method method = CloudWatchAsyncClient.class.getMethod("getMetricStatisticsInRegion", String.class, String.class,
|
||||||
Date.class, Date.class, int.class, String.class);
|
String.class, Date.class, Date.class, int.class, String.class);
|
||||||
HttpRequest request = processor.createRequest(method, (String) null, "CPUUtilization", date, date, 60, "Average");
|
HttpRequest request = processor.createRequest(method, (String) null, "CPUUtilization", "AWS/EC2", date, date, 60, "Average");
|
||||||
|
|
||||||
assertRequestLineEquals(request, "POST https://monitoring.us-east-1.amazonaws.com/ HTTP/1.1");
|
assertRequestLineEquals(request, "POST https://monitoring.us-east-1.amazonaws.com/ HTTP/1.1");
|
||||||
assertNonPayloadHeadersEqual(request, "Host: monitoring.us-east-1.amazonaws.com\n");
|
assertNonPayloadHeadersEqual(request, "Host: monitoring.us-east-1.amazonaws.com\n");
|
||||||
try {
|
try {
|
||||||
assertPayloadEquals(
|
assertPayloadEquals(
|
||||||
request,
|
request,
|
||||||
"Version=2009-05-15&Action=GetMetricStatistics&Statistics.member.1=Average&StartTime=1970-01-01T02%3A46%3A40Z&MeasureName=CPUUtilization&EndTime=1970-01-01T02%3A46%3A40Z&Period=60",
|
"Version=2010-08-01&Action=GetMetricStatistics&Statistics.member.1=Average&StartTime=1970-01-01T02%3A46%3A40Z&Namespace=AWS%2FEC2&&MetricName=CPUUtilization&EndTime=1970-01-01T02%3A46%3A40Z&Period=60",
|
||||||
"application/x-www-form-urlencoded", false);
|
"application/x-www-form-urlencoded", false);
|
||||||
} catch (AssertionError e) {
|
} catch (AssertionError e) {
|
||||||
// mvn 3.0 osx 10.6.5 somehow sorts differently
|
// mvn 3.0 osx 10.6.5 somehow sorts differently
|
||||||
assertPayloadEquals(
|
assertPayloadEquals(
|
||||||
request,
|
request,
|
||||||
"Version=2009-05-15&Action=GetMetricStatistics&Statistics.member.1=Average&StartTime=1970-01-01T02%3A46%3A40Z&MeasureName=CPUUtilization&Period=60&EndTime=1970-01-01T02%3A46%3A40Z",
|
"Version=2010-08-01&Action=GetMetricStatistics&Statistics.member.1=Average&Period=60&Namespace=AWS%2FEC2&MetricName=CPUUtilization&StartTime=1970-01-01T02%3A46%3A40Z&EndTime=1970-01-01T02%3A46%3A40Z",
|
||||||
"application/x-www-form-urlencoded", false);
|
"application/x-www-form-urlencoded", false);
|
||||||
}
|
}
|
||||||
assertResponseParserClassEquals(method, request, ParseSax.class);
|
assertResponseParserClassEquals(method, request, ParseSax.class);
|
||||||
|
|
Loading…
Reference in New Issue