Skip to content
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

Subtests for issue #1520 #1829

Closed
wants to merge 7 commits into from
Closed

Subtests for issue #1520 #1829

wants to merge 7 commits into from

Conversation

petdance
Copy link
Contributor

@petdance petdance commented Aug 9, 2021

Summary

Convert three .t files to use subtest in response to issue #1520.

# Defaults
my $res = Mojo::Message::Response->new;
is $res->max_message_size, 2147483648, 'right default';
# $dir is used in multiple subtests.
Copy link
Member

Choose a reason for hiding this comment

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

Inconsistent comment format.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed since that $dir is going away.

How should that comment have been done?

};

subtest 'WebSocket with SOCKS proxy' => sub {
my $ua = Mojo::UserAgent->new(ioloop => Mojo::IOLoop->singleton, insecure => 1);
Copy link
Member

Choose a reason for hiding this comment

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

This test doesn't appear to have a SOCKS proxy configured in the new user agent.

my $res = Mojo::Message::Response->new;
is $res->max_message_size, 2147483648, 'right default';
# $dir is used in multiple subtests.
my $dir = tempdir;
Copy link
Member

Choose a reason for hiding this comment

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

It's only used in two places, that's not really worth sharing. The two tests can just have their own tempdir each.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's fine with me. I didn't want to potentially cause any changes in behavior by using two different temp dirs.

};

subtest 'Keep alive request with SOCKS proxy' => sub {
my $ua = Mojo::UserAgent->new(ioloop => Mojo::IOLoop->singleton, insecure => 1);
Copy link
Member

Choose a reason for hiding this comment

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

This test doesn't appear to have a SOCKS proxy configured in the new user agent.

@kraih
Copy link
Member

kraih commented Aug 9, 2021

Please squash perltidy commits into the relevant "feature" commits.

@petdance
Copy link
Contributor Author

petdance commented Aug 9, 2021

Do you want one commit for each of the test files? Or should all three go into one commit?

@kraih
Copy link
Member

kraih commented Aug 9, 2021

One commit for everything would be fine too. The preferred version would be one commit per test file though.

@petdance
Copy link
Contributor Author

petdance commented Aug 9, 2021

Then that's what I'll do.

@petdance
Copy link
Contributor Author

petdance commented Aug 9, 2021

I've redone this PR as #1831

@petdance petdance deleted the subtests branch August 9, 2021 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants