Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Messenger] Add more tests around the AMQP transport#27206

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@sroze
Copy link
Contributor

@srozesroze commentedMay 8, 2018
edited
Loading

QA
Branch?4.1
Bug fix?no
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed ticketsø
LicenseMIT
Doc PRø

Adding more tests to the AMQP transport/factory. These should have captured the following 3 bugs:#27198,#27197,#27196.

@srozesrozeforce-pushed theadd-more-tests-around-the-amqp-transport branch from092b559 to022c47fCompareMay 8, 2018 21:27
@srozesroze added this to the4.1 milestoneMay 8, 2018
@srozesrozeforce-pushed theadd-more-tests-around-the-amqp-transport branch from022c47f to4b8a655CompareMay 8, 2018 21:28
publicfunctioncreateTransport(string$dsn,array$options):TransportInterface
{
returnnewAmqpTransport($this->encoder,$this->decoder,$dsn,$options,$this->debug);
returnnewAmqpTransport(
Copy link
Member

@ycerutoycerutoMay 8, 2018
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

shouldn't it be in one line?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

yes, it should

newAmqpTransport($encoder,$decoder, Connection::fromDsn('amqp://localhost',array('foo' =>'bar'),true),array('foo' =>'bar'),true),
$transport
);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

should be on one line

$connection,
$options,
$debug
);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

one line as well

private$decoder;
private$dsn;
private$connection;
private$options;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

$options and $debug are not used anymore

@srozesrozeforce-pushed theadd-more-tests-around-the-amqp-transport branch from4b8a655 to1c0bb0eCompareMay 9, 2018 07:44
@sroze
Copy link
ContributorAuthor

@fabpot@yceruto@ogizanagi good catches, updated.

useSymfony\Component\Messenger\Transport\Serialization\EncoderInterface;
useSymfony\Component\Messenger\Transport\TransportInterface;

class AmqpTransportTestextends TestCase
Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Should requires amqp extension

@srozesrozeforce-pushed theadd-more-tests-around-the-amqp-transport branch from1c0bb0e tofaf9382CompareMay 9, 2018 08:04
$this->dsn =$dsn;
$this->options =$options;
$this->debug =$debug;
$this->connection =$connection;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This removes laziness. I'd suggest to try harder keeping feature. The factory could validate the dsn itself if that's the goal here?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Non. The laziness is alreadywithin theConnection object. There is no point of making a class creation lazy 😄 (and even that is already lazy as behind service locators)

Copy link
Member

@nicolas-grekasnicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Got it :)

@srozesroze merged commitfaf9382 intosymfony:4.1May 10, 2018
sroze added a commit that referenced this pull requestMay 10, 2018
…oze)This PR was merged into the 4.1 branch.Discussion----------[Messenger] Add more tests around the AMQP transport| Q             | A| ------------- | ---| Branch?       | 4.1| Bug fix?      | no| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | ø| License       | MIT| Doc PR        | øAdding more tests to the AMQP transport/factory. These should have captured the following 3 bugs:#27198,#27197,#27196.Commits-------faf9382 Add more tests around the AMQP transport
@srozesroze deleted the add-more-tests-around-the-amqp-transport branchMay 10, 2018 07:25
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot left review comments

@ycerutoycerutoyceruto left review comments

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

+1 more reviewer

@ogizanagiogizanagiogizanagi approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

4.1

Development

Successfully merging this pull request may close these issues.

6 participants

@sroze@fabpot@nicolas-grekas@yceruto@ogizanagi@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp