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

fix(store): Fix the TestFileStreamingService unit test. #14305

Merged
merged 8 commits into from
Dec 14, 2022

Conversation

SpicyLemon
Copy link
Collaborator

@SpicyLemon SpicyLemon commented Dec 14, 2022

Description

Closes: #14302

Fix the TestFileStreamingService unit test.


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change N/A
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • followed the guidelines for building modules N/A
  • included the necessary unit and integration tests N/A
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code N/A
  • updated the relevant documentation or specification N/A
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

@SpicyLemon SpicyLemon marked this pull request as ready for review December 14, 2022 20:04
@SpicyLemon SpicyLemon requested a review from a team as a code owner December 14, 2022 20:04
@julienrbrt julienrbrt added backport/0.46.x PR scheduled for inclusion in the v0.46's next stable release backport/v0.47.x PR scheduled for inclusion in the v0.47's next stable release labels Dec 14, 2022
@julienrbrt julienrbrt enabled auto-merge (squash) December 14, 2022 20:06
@@ -116,7 +116,8 @@ func TestFileStreamingService(t *testing.T) {
defer os.RemoveAll(testDir)

testKeys := []types.StoreKey{mockStoreKey1, mockStoreKey2}
testStreamingService, err := NewStreamingService(testDir, testPrefix, testKeys, testMarshaller, log.NewNopLogger(), true, false, false)
var err error
testStreamingService, err = NewStreamingService(testDir, testPrefix, testKeys, testMarshaller, log.NewNopLogger(), true, false, false)
require.Nil(t, err)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
require.Nil(t, err)
require.NoError(t, err)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I agree that it should be NoError, but there are a whole lot of other things about this test that should also be fixed, and I didn't want to get lost in all of it. E.g. require.Nil is used against errors in many places.

CHANGELOG.md Outdated Show resolved Hide resolved
@julienrbrt julienrbrt merged commit aba4e6e into main Dec 14, 2022
@julienrbrt julienrbrt deleted the dwedul/14302-fix-streaming-test branch December 14, 2022 22:17
mergify bot pushed a commit that referenced this pull request Dec 14, 2022
mergify bot pushed a commit that referenced this pull request Dec 14, 2022
(cherry picked from commit aba4e6e)

# Conflicts:
#	store/streaming/file/service_test.go
julienrbrt added a commit that referenced this pull request Dec 14, 2022
) (#14309)

Co-authored-by: Daniel Wedul <github@wedul.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
ryanchristo pushed a commit to regen-network/cosmos-sdk that referenced this pull request Dec 15, 2022
…mos#14305) (cosmos#14309)

Co-authored-by: Daniel Wedul <github@wedul.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
julienrbrt pushed a commit that referenced this pull request Dec 15, 2022
) (#14308)

Co-authored-by: Daniel Wedul <github@wedul.com>
JeancarloBarrios pushed a commit to agoric-labs/cosmos-sdk that referenced this pull request Sep 28, 2024
…mos#14305) (cosmos#14309)

Co-authored-by: Daniel Wedul <github@wedul.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/v0.47.x PR scheduled for inclusion in the v0.47's next stable release backport/0.46.x PR scheduled for inclusion in the v0.46's next stable release C:Store
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TestFileStreamingService fails and is missed by the Github actions.
3 participants