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

NOISSUE - Fix Readers logs #735

Merged
merged 3 commits into from
May 7, 2019
Merged

NOISSUE - Fix Readers logs #735

merged 3 commits into from
May 7, 2019

Conversation

manuio
Copy link
Contributor

@manuio manuio commented May 3, 2019

Signed-off-by: Manuel Imperiale manuel.imperiale@gmail.com

@codecov-io
Copy link

codecov-io commented May 3, 2019

Codecov Report

Merging #735 into master will decrease coverage by 0.22%.
The diff coverage is 58.06%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #735      +/-   ##
==========================================
- Coverage   85.39%   85.16%   -0.23%     
==========================================
  Files          64       64              
  Lines        4230     4133      -97     
==========================================
- Hits         3612     3520      -92     
+ Misses        418      415       -3     
+ Partials      200      198       -2
Impacted Files Coverage Δ
readers/api/endpoint.go 85.71% <33.33%> (-8.04%) ⬇️
readers/mongodb/messages.go 86.88% <50%> (-2.41%) ⬇️
readers/influxdb/messages.go 78.44% <58.33%> (-8.9%) ⬇️
readers/cassandra/messages.go 90.9% <75%> (+0.79%) ⬆️
sdk/go/sdk.go 96.15% <0%> (ø) ⬆️
sdk/go/message.go 38.59% <0%> (+3.11%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9f1151b...649189e. Read the comment docs.

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
drasko
drasko previously approved these changes May 7, 2019
Copy link
Contributor

@drasko drasko left a comment

Choose a reason for hiding this comment

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

LGTM

result, err := reader.ReadAll(tc.chanID, tc.offset, tc.limit, tc.query)
if err != nil {
assert.Equal(t, nil, err, fmt.Sprintf("%s: expected no error got %s", desc, err.Error()))
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't use if err != nil {. Use assert.Nil instead of this if and assert.Equal.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks!

result, err := reader.ReadAll(tc.chanID, tc.offset, tc.limit, tc.query)
if err != nil {
assert.Equal(t, nil, err, fmt.Sprintf("%s: expected no error got %s", desc, err.Error()))
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here, use assert.Nil instead.

result, err := reader.ReadAll(tc.chanID, tc.offset, tc.limit, tc.query)
if err != nil {
assert.Equal(t, nil, err, fmt.Sprintf("%s: expected no error got %s", desc, err.Error()))
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here, replace with assert.Nil.

@@ -85,21 +87,21 @@ func (cr cassandraRepository) ReadAll(chanID string, offset, limit uint64, query
}

if err := iter.Close(); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please ignore this error and move iter.Close() to line 44 of this file. So it should be defer iter.Close().

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
Copy link
Contributor

@anovakovic01 anovakovic01 left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@drasko drasko left a comment

Choose a reason for hiding this comment

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

LGTM

@drasko drasko merged commit 138dae9 into absmach:master May 7, 2019
@manuio manuio deleted the readers-logs branch May 9, 2019 13:51
davide83 pushed a commit to davide83/mainflux that referenced this pull request May 13, 2019
* NOISSUE - Fix Readers logs

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Fix reviews

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
rugwirobaker pushed a commit to rugwirobaker/mainflux that referenced this pull request Jun 26, 2019
* NOISSUE - Fix Readers logs

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Fix reviews

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
manuio added a commit that referenced this pull request Oct 12, 2020
* NOISSUE - Fix Readers logs

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Fix reviews

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
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.

4 participants