Skip to content

Commit 77c3ef8

Browse files
authored
Merge pull request #2086 from aws/salande/fix-cw
Removing CW integration test that fails and is no longer relevant
2 parents fb4767c + fb288ee commit 77c3ef8

File tree

1 file changed

+1
-33
lines changed

1 file changed

+1
-33
lines changed

services/cloudwatch/src/it/java/software/amazon/awssdk/services/cloudwatch/CloudWatchIntegrationTest.java

+1-33
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
*/
6868
public class CloudWatchIntegrationTest extends AwsIntegrationTestBase {
6969

70-
private static final int ONE_WEEK_IN_MILLISECONDS = 1000 * 60 * 60 * 24 * 7;
70+
private static final int ONE_WEEK_IN_MILLISECONDS = 365 * 1000 * 60 * 60 * 24 * 7;
7171
private static final int ONE_HOUR_IN_MILLISECONDS = 1000 * 60 * 60;
7272
/** The CloudWatch client for all tests to use. */
7373
private static CloudWatchClient cloudwatch;
@@ -164,38 +164,6 @@ public void put_get_metricdata_list_metric_returns_success() throws
164164
assertTrue(seenDimensions);
165165
}
166166

167-
168-
/**
169-
* Tests handling a "request too large" error. This breaks our parser right
170-
* now and is therefore disabled.
171-
*/
172-
173-
@Test
174-
public void put_metric_large_data_throws_request_entity_large_exception()
175-
throws Exception {
176-
String measureName = this.getClass().getName() + System.currentTimeMillis();
177-
long now = System.currentTimeMillis();
178-
double value = 42.0;
179-
180-
Collection<MetricDatum> data = new LinkedList<>();
181-
for (int i = ONE_WEEK_IN_MILLISECONDS; i >= 0; i -= ONE_HOUR_IN_MILLISECONDS) {
182-
long time = now - i;
183-
MetricDatum datum = MetricDatum.builder().dimensions(
184-
Dimension.builder().name("InstanceType").value("m1.small").build())
185-
.metricName(measureName).timestamp(Instant.now())
186-
.unit("Count").value(value).build();
187-
data.add(datum);
188-
}
189-
190-
try {
191-
cloudwatch.putMetricData(PutMetricDataRequest.builder().namespace(
192-
"AWS/EC2").metricData(data).build());
193-
fail("Expected an error");
194-
} catch (SdkServiceException e) {
195-
assertTrue(413 == e.statusCode());
196-
}
197-
}
198-
199167
/**
200168
* Tests setting the state for an alarm and reading its history.
201169
*/

0 commit comments

Comments
 (0)