-
Notifications
You must be signed in to change notification settings - Fork 513
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
CoderTest changes for v0.13.x #4806
Conversation
* Refactor coder tests * Fixes * fix scala 2.12 errors * One more fix * One more fix * fix * one more fix * one more fix * one more fix * added file headers * added more checks on primitives * Fixing checks failures * Fixing checks * Fix tests * Removed coderShouldThrowOn * fix * Added more checks and fixed a few coders * Update scio-test/src/test/scala/com/spotify/scio/coders/CoderTest.scala Co-authored-by: Michel Davit <micheld@spotify.com> * fixes after review * Fixing WrappedArray issue * fix format issue * Ran scalafixAll on scio-core * modify syntax with custom options * fix --------- Co-authored-by: Michel Davit <micheld@spotify.com>
Codecov Report
@@ Coverage Diff @@
## main #4806 +/- ##
==========================================
+ Coverage 61.25% 62.40% +1.15%
==========================================
Files 286 280 -6
Lines 10570 10407 -163
Branches 772 760 -12
==========================================
+ Hits 6475 6495 +20
+ Misses 4095 3912 -183
|
needs to run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add some more context in the PR description? Seems like the most salient change is adding these coder test syntaxes?
@@ -1,5 +1,5 @@ | |||
/* | |||
* Copyright 2021 Spotify AB. | |||
* Copyright 2019 Spotify AB. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a new file, but I just copy pasted that header from somewhere :)
@@ -681,7 +321,7 @@ private[coders] object CoderStackTrace { | |||
.currentThread() | |||
.getStackTrace | |||
.dropWhile(!_.getClassName.contains(CoderMaterializer.getClass.getName)) | |||
.take(10) | |||
.take(15) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the reason for this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stacktrace increased after adding syntax sugar to CoderAssertions, with 10
it cannot reach the CoderMaterializer.getClass.getName in tests, so impossible to verify it works. So totally driven by test case
@@ -49,7 +49,7 @@ object JodaCoders { | |||
} | |||
} | |||
|
|||
final private class JodaDateTimeCoder extends AtomicCoder[DateTime] { | |||
final private[coders] class JodaDateTimeCoder extends AtomicCoder[DateTime] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the intent here that users will never create a coder instance and instead use the ones defined in JodaCoders
and inherited by Coder
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the intent of the change - a scope widening to access it from tests :)
by design it was private, I assume, to incapsulate this complexity and deliver coders as implicits (consumed by macro-generated coders)
@kellen will add more context in the description |
@RustedBones |
Whatever changes were in master re:Coder,CodetTest are manually integrated in this PR.
upd: more context
this is a merge of changes from #4664: