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

Only numbers should be num-coercable #203

Merged
merged 1 commit into from
Oct 3, 2019
Merged

Only numbers should be num-coercable #203

merged 1 commit into from
Oct 3, 2019

Conversation

gphilipp
Copy link
Contributor

@gphilipp gphilipp commented Oct 3, 2019

If you have a union type like ["long" "string"], the avro serde would fail to serialise a string which contains a numerical value, eg: "123". I added a test case for that. The fix simply checks if the passed value to the num-coercable? function is actually a number.

Signed-off-by: Gilles Philippart <gilles.philippart@fundingcircle.com>
@gphilipp gphilipp requested a review from a team as a code owner October 3, 2019 18:30
@codecov
Copy link

codecov bot commented Oct 3, 2019

Codecov Report

Merging #203 into master will increase coverage by 1.27%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #203      +/-   ##
=========================================
+ Coverage   79.52%   80.8%   +1.27%     
=========================================
  Files          41      39       -2     
  Lines        2530    2365     -165     
  Branches      151     149       -2     
=========================================
- Hits         2012    1911     -101     
+ Misses        367     305      -62     
+ Partials      151     149       -2
Impacted Files Coverage Δ
src/jackdaw/serdes/avro.clj 87.92% <100%> (+0.03%) ⬆️
src/jackdaw/serdes/edn.clj 80.76% <0%> (-19.24%) ⬇️
src/jackdaw/test/commands.clj 86.95% <0%> (-13.05%) ⬇️
src/jackdaw/test/fixtures.clj 55.7% <0%> (-11.18%) ⬇️
src/jackdaw/admin.clj 83.48% <0%> (-5.51%) ⬇️
src/jackdaw/streams/interop.clj 78.68% <0%> (-1.6%) ⬇️
src/jackdaw/client.clj 78.51% <0%> (-1.22%) ⬇️
src/jackdaw/test.clj 77.77% <0%> (-1.02%) ⬇️
src/jackdaw/streams.clj 81.96% <0%> (-0.3%) ⬇️
src/jackdaw/test/serde.clj 94.44% <0%> (ø) ⬆️
... and 10 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 2301271...eede5cc. Read the comment docs.

@cddr cddr merged commit 99f5f97 into master Oct 3, 2019
@cddr cddr deleted the fix-num-coercable branch October 3, 2019 19: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