Skip to content

Commit

Permalink
Fixes for automated test
Browse files Browse the repository at this point in the history
  • Loading branch information
markinjapan committed Jun 16, 2023
1 parent 7b5d47f commit febe94f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/Handler/CloudWatch.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,7 @@ private function flushBuffer(): void
try {
// send items
$this->send($this->buffer);
}
catch (\Aws\CloudWatchLogs\Exception\CloudWatchLogsException $e) {
} catch (\Aws\CloudWatchLogs\Exception\CloudWatchLogsException $e) {
// Wait for 1 second and try to send items again (in case of per account per region rate limiting)
sleep(1);
$this->send($this->buffer);
Expand Down
13 changes: 12 additions & 1 deletion tests/Handler/CloudWatchTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,18 @@ public function testInitializeWithCreateStreamDisabled(): void
->expects($this->never())
->method('describeLogStreams');

$handler = new CloudWatch($this->clientMock, $this->groupName, $this->streamName, 14, 10000, [], Level::Debug, true, false, false);
$handler = new CloudWatch(
$this->clientMock,
$this->groupName,
$this->streamName,
14,
10000,
[],
Level::Debug,
true,
false,
false
);

$reflection = new \ReflectionClass($handler);
$reflectionMethod = $reflection->getMethod('initialize');
Expand Down

0 comments on commit febe94f

Please sign in to comment.