Skip to content

fix bug: mapping from msgpack response to int, Integer, long, Long types works fine - #671

Open
chabapok wants to merge 1 commit into
influxdata:masterfrom
chabapok:master
Open

fix bug: mapping from msgpack response to int, Integer, long, Long types works fine#671
chabapok wants to merge 1 commit into
influxdata:masterfrom
chabapok:master

Conversation

@chabapok

@chabapokchabapok commented Apr 9, 2020

Copy link
Copy Markdown

All of the unit tests of the InfluxDBResultMapper is based on the assumption that all numbers in response from influxd is Double. It will be ok with JSON. But msgpack format is more precise.

So, InfluxDBResultMapper have errors. For example, it throws an exception when mapping number to int, Integer, long, Long types from msgpack responses, but works with json.

This PR fix it (with unit test).

@majst01

Copy link
Copy Markdown
Collaborator

Nice catch, one small formatting nit:

[ERROR] /usr/src/mymaven/src/main/java/org/influxdb/impl/InfluxDBResultMapper.java:364:37: 'typecast' is not followed by whitespace. [WhitespaceAfter]
[ERROR] /usr/src/mymaven/src/main/java/org/influxdb/impl/InfluxDBResultMapper.java:385:33: 'typecast' is not followed by whitespace. [WhitespaceAfter]
[ERROR] /usr/src/mymaven/src/main/java/org/influxdb/impl/InfluxDBResultMapper.java:389:33: 'typecast' is not followed by whitespace. [WhitespaceAfter]

@codecov-io

codecov-io commented Apr 10, 2020

Copy link
Copy Markdown

Codecov Report

Merging #671 into master will not change coverage by %.
The diff coverage is 100.00%.

Impacted file tree graph

@@ Coverage Diff @@## master #671 +/- ##
=========================================
Coverage 88.18% 88.18% Complexity 722 722 =========================================
Files 69 69 Lines 2513 2513 Branches 268 268 =========================================
Hits 2216 2216 Misses 208 208 Partials 89 89 
Impacted FilesCoverage ΔComplexity Δ
...n/java/org/influxdb/impl/InfluxDBResultMapper.java88.81% <100.00%> (ø)57.00 <0.00> (ø)

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 b3367fd...059089b. Read the comment docs.

@fmachado
fmachado self-requested a review April 10, 2020 10:50
@fmachado

Copy link
Copy Markdown
Contributor

I'm reviewing this PR. Please, do not merge.

@BrentonPoke

Copy link
Copy Markdown

Did anything ever happen with this one?

@kaszperro

Copy link
Copy Markdown

What is a progress on this?

@gbennardo

Copy link
Copy Markdown

Hi @fmachado, any update on this PR?

@BrentonPoke

Copy link
Copy Markdown

I think he stopped working on this a long time ago. That's left a lot of PRs unmerged and most have likely gone to the influxdb-client-java repo.

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.18%. Comparing base (b3367fd) to head (059089b).
⚠️ Report is 239 commits behind head on master.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@ Coverage Diff @@## master #671 +/- ##
=========================================
Coverage 88.18% 88.18% Complexity 722 722 =========================================
Files 69 69 Lines 2513 2513 Branches 268 268 =========================================
Hits 2216 2216 Misses 208 208 Partials 89 89 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for freeto 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.

8 participants

@chabapok@majst01@codecov-io@fmachado@BrentonPoke@kaszperro@gbennardo@codecov-commenter