-
-
Notifications
You must be signed in to change notification settings - Fork 138
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
[ JSTEP-10 ] Migrate avro
module tests to JUnit 5
#549
[ JSTEP-10 ] Migrate avro
module tests to JUnit 5
#549
Conversation
@MethodSource("getParameters") | ||
@ParameterizedTest(name = "{3}") | ||
public void testEmptyRecordWithRecordValues( | ||
Function<Type, Schema> schemaFunctor, BiFunction<Schema, Object, byte[]> serializeFunctor, | ||
BiFunction<Schema, byte[], Object> deserializeFunctor, String combinationName) | ||
throws IOException | ||
{ | ||
useParameters(schemaFunctor, serializeFunctor, deserializeFunctor); | ||
|
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.
@cowtowncoder @yawkat @pjfanning Just a small question, by any chance you know any alternate option to solve this problem, regarding JUnit4
parameterized test mechanism?
Seems like with Junit4 declaring Parameterized in super abstract class InteropTestBase
would take effect on all extended classes' tests and I have not managed to find corresponding solution JUnit5
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.
https://www.baeldung.com/parameterized-tests-junit-5 looks like this covers it - another jar seems to be needed - junit-jupiter-params
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.
Also possible this tutorial with source code example.
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.
@pjfanning Thank you for sharing another reference, tho I am not sure which feature from the baeldung tutorial you are refering to?
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't you leave this test as junit 4 and log an issue to return to it?
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.
While it'd be great to convert it, leaving it for now is fine if full solution would take longer.
jackson-databind
, f.ex, has trace amount of JUnit 4 for ConcurrentLinkedHashMap tests but everything else is converted.
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.
Make sense putting it aside for later 😆
thank you for ideas @pjfanning, @cowtowncoder
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.
Looks ready
Merged to |
related #547
Blocked by #548