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

[dbnode] Large tiles writer tests #2608

Conversation

gediminasgu
Copy link
Collaborator

Unit test for larges tiles writer.

NONE
NONE

Copy link
Collaborator

@linasm linasm left a comment

Choose a reason for hiding this comment

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

LGTM with some minor nits, just want to understand if the datapoint values are checked somewhere.

"testing"
"time"

"github.com/golang/mock/gomock"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Move to a separate block.

"github.com/m3db/m3/src/x/context"
"github.com/m3db/m3/src/x/ident"
xtime "github.com/m3db/m3/src/x/time"
"github.com/stretchr/testify/require"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Move to a separate block.

readInfoFileResults := ReadInfoFiles(filePathPrefix, testNs1ID, 0, 16, nil, persist.FileSetFlushType)
require.Equal(t, 1, len(readInfoFileResults))
for _, result := range readInfoFileResults {
require.NoError(t, result.Err.Error())
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since you have already established that len(readInfoFileResults) == 1, and are working just with readInfoFileResults[0].Info below, it might be more consistent to directly check readInfoFileResults[0].Err here as well (instrad of the loop).

}

r := newTestReader(t, filePathPrefix)
readTestDataWithOrderOpt(t, r, 0, testWriterStart, expectEntries, true)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I might be missing something, but is there any place where it checks the actual datapoint values written?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@gediminasgu
Copy link
Collaborator Author

Moved to Writer PR here: #2618

@gediminasgu gediminasgu closed this Sep 9, 2020
@gediminasgu gediminasgu deleted the gg/large-tiles-writer-tests branch September 9, 2020 09:19
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