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

Discard error returned by os.RemoveAll() when pruning test dirs #4264

Merged
merged 1 commit into from
May 3, 2019

Conversation

alessio
Copy link
Contributor

@alessio alessio commented May 3, 2019

  • Linked to github-issue with discussion and accepted design OR link to spec that describes this work.
  • Wrote tests
  • Updated relevant documentation (docs/)
  • Added a relevant changelog entry: clog add [section] [stanza] [message]
  • rereviewed Files changed in the github PR explorer

For Admin Use:

  • Added appropriate labels to PR (ex. wip, ready-for-review, docs)
  • Reviewers Assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

@codecov
Copy link

codecov bot commented May 3, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@df362ff). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master    #4264   +/-   ##
=========================================
  Coverage          ?   59.12%           
=========================================
  Files             ?      217           
  Lines             ?    14587           
  Branches          ?        0           
=========================================
  Hits              ?     8625           
  Misses            ?     5324           
  Partials          ?      638

@alessio alessio marked this pull request as ready for review May 3, 2019 14:51
@alessio alessio requested review from fedekunze and sabau May 3, 2019 14:52
@@ -353,7 +353,7 @@ func InitializeTestLCD(t *testing.T, nValidators int, initAddrs []sdk.AccAddress
node.Stop() //nolint:errcheck
node.Wait()
lcd.Close()
require.NoError(t, os.RemoveAll(config.RootDir))
os.RemoveAll(config.RootDir)
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we expect the error here to be non-deterministic? Why remove?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, that's correct. Some directories may not be removed because there are processes that are still writing files into them at the time of the removal. We shall replace the lcd tests in the near future, I wouldn't spend too much time into investigating this small thing.

@alessio
Copy link
Contributor Author

alessio commented May 3, 2019

Merging as this is blocking other PRs

@alessio alessio merged commit 67ab0b1 into master May 3, 2019
@alessio alessio deleted the alessio/discard-error-on-test-cleanup branch May 3, 2019 16:08
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