-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Messenger][SQS] Make sure one can enable debug logs #38998
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
||
Connection::fromDsn('sqs://default', ['bar' => 'bar']); | ||
} | ||
|
||
public function testFromDsnWithInvalidQueryStringAndOption() | ||
{ | ||
$this->expectException(\InvalidArgumentException::class); | ||
$this->expectExceptionMessage('Unknown option found: [bar]. Allowed options are [buffer_size, wait_time, poll_timeout, visibility_timeout, auto_setup, access_key, secret_key, endpoint, region, queue_name, account, sslmode].'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont want this test to fail every time we add a new option.
@@ -312,4 +315,83 @@ public function testGetQueueUrlNotCalled() | |||
|
|||
$connection->delete('id'); | |||
} | |||
|
|||
public function testLoggerWithoutDebugOption() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could replace these tests by just comparing objects of SqsClient
and just see if they got the same config... that might be better and more "unit"
src/Symfony/Component/Messenger/Bridge/AmazonSqs/Transport/Connection.php
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will need a CHANGELOG entry for this
I added change log for 5.3 |
Helpful! Thank you Tobias. |
Thank you for merging. |
If you add
&debug=true
on your DSN, then we will useLoggerInterface::debug()
to print HTTP requests and responses.This has a negative impact on performance, but it will be helpful when debugging.