Skip to content

Commit 0950eb9

Browse files
authored
Merge pull request #1560 from aws/zoewangg-patch-1
Remove unnecessary service integration
2 parents 2a393c2 + fe334ec commit 0950eb9

File tree

1 file changed

+0
-47
lines changed

1 file changed

+0
-47
lines changed

services/cloudwatchlogs/src/it/java/software/amazon/awssdk/services/cloudwatchlogs/ServiceIntegrationTest.java

-47
Original file line numberDiff line numberDiff line change
@@ -162,53 +162,6 @@ public void tearDown() {
162162
}
163163
}
164164

165-
/**
166-
* Test uploading and retrieving log events.
167-
*/
168-
@Test
169-
public void testEventsLogging() {
170-
// No log event is expected in the newly created log stream
171-
GetLogEventsResponse getResult = awsLogs.getLogEvents(GetLogEventsRequest.builder().logGroupName(logGroupName).logStreamName(logStreamName).build());
172-
Assert.assertTrue(getResult.events().isEmpty());
173-
174-
// Insert a new log event
175-
PutLogEventsRequest request = PutLogEventsRequest.builder()
176-
.logGroupName(logGroupName)
177-
.logStreamName(logStreamName)
178-
.logEvents(InputLogEvent.builder()
179-
.message(LOG_MESSAGE)
180-
.timestamp(LOG_MESSAGE_TIMESTAMP)
181-
.build())
182-
.build();
183-
PutLogEventsResponse putResult = awsLogs.putLogEvents(request);
184-
185-
Assert.assertNotNull(putResult.nextSequenceToken());
186-
187-
// The new log event is not instantly available in GetLogEvents operation.
188-
try {
189-
Thread.sleep(5000);
190-
} catch (InterruptedException ignored) {
191-
// Ignored or expected.
192-
}
193-
194-
// Pull the event from the log stream
195-
getResult = awsLogs.getLogEvents(GetLogEventsRequest.builder().logGroupName(logGroupName).logStreamName(logStreamName).build());
196-
Assert.assertEquals(1, getResult.events().size());
197-
Assert.assertNotNull(getResult.nextBackwardToken());
198-
Assert.assertNotNull(getResult.nextForwardToken());
199-
200-
OutputLogEvent event = getResult.events().get(0);
201-
Assert.assertEquals(LOG_MESSAGE, event.message());
202-
Assert.assertEquals(LOG_MESSAGE_TIMESTAMP, event.timestamp().longValue());
203-
204-
// Use DescribeLogStreams API to verify that the new log event has
205-
// updated the following parameters of the log stream.
206-
final LogStream stream = findLogStreamByName(awsLogs, logGroupName, logStreamName);
207-
Assert.assertEquals(LOG_MESSAGE_TIMESTAMP, stream.firstEventTimestamp().longValue());
208-
Assert.assertEquals(LOG_MESSAGE_TIMESTAMP, stream.lastEventTimestamp().longValue());
209-
Assert.assertNotNull(stream.lastIngestionTime());
210-
}
211-
212165
/**
213166
* Use the TestMetricFilter API to verify the correctness of the metric filter pattern we have
214167
* been using in this integration test.

0 commit comments

Comments
 (0)