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

[changelog skip] Move integration logging test to main test suite #2240

Conversation

harrylewis
Copy link
Contributor

Description

This PR moves the first of 3 integration tests mentioned in #2172 that live in the test/shell directory into the main test suite.

There was a suggestion to remove the test altogether if there are current tests that exercise the functionality. A cursory look through the existing tests indicates to me that this test is fairly unique.

I decided to move the first test, the "does it log" test to the TestIntegrationSingle, as it seemed to me to fit best into this kind of basic configuration scenario (hopefully I am understand the context of these tests correctly).

Your checklist for this pull request

  • I have reviewed the guidelines for contributing to this repository.
  • I have added an entry to History.md if this PR fixes a bug or adds a feature. If it doesn't need an entry to HISTORY.md, I have added [changelog skip] the pull request title.
  • I have added appropriate tests if this PR fixes a bug or adds a feature.
  • My pull request is 100 lines added/removed or less so that it can be easily reviewed.
  • If this PR doesn't need tests (docs change), I added [ci skip] to the title of the PR.
  • If this closes any issues, I have added "Closes #issue" to the PR description or my commit messages.
  • I have updated the documentation accordingly.
  • All new and existing tests passed, including Rubocop.

@harrylewis
Copy link
Contributor Author

I feel the PR is still needs a bit of work. Since this is my first contribution to Puma, I wanted to get feedback in early. Not sure how to assign reviewers, or labels. I'm assuming that is done by the project maintainers.

Copy link
Contributor Author

@harrylewis harrylewis left a comment

Choose a reason for hiding this comment

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

Not sure what the edicate is here. I like to leave "self-reviews" to give reviewers context into some the nuances of my changes. Please let me know how you feel about this.

def test_write_to_log
skip_unless_signal_exist? :TERM

suppress_output = '> /dev/null 2>&1'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wanted to clean up the test output, so I suppressed the curl return.

@@ -112,4 +112,23 @@ def test_siginfo_thread_print

assert_match "Thread: TID", output.join
end

def test_write_to_log
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Most of this is copied from test/shell/t1.rb. One of the main modifications was to remove the #sleep calls. I felt they were unnecessary now given the helper methods #cli_server, and #stop-server wait until the Puma starts fully before handing control back to the test.

@harrylewis harrylewis marked this pull request as ready for review April 28, 2020 22:44
@nateberkopec nateberkopec added maintenance waiting-for-review Waiting on review from anyone labels Apr 29, 2020
@nateberkopec nateberkopec merged commit e5f1655 into puma:master Apr 29, 2020
@nateberkopec
Copy link
Member

Cheers! Good work.

@harrylewis harrylewis deleted the chore/move-integration-tests-to-regular-suite branch April 29, 2020 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance waiting-for-review Waiting on review from anyone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants