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

Add test for parseFrom message with nested extension #283

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jckegelman
Copy link

Add a (failing) test for using parseFrom for creating a Dataset from serialized messages where the message definition includes a nested extension. This test currently fails with

[info] ExtensionsSpec:
[info] Creating Dataset from message with nested extension
[info] - should work *** FAILED ***
[info]   org.apache.spark.SparkException: Task not serializable
...
[info]   Cause: java.io.NotSerializableException: scalapb.lenses.Lens$$anon$1
[info] Serialization stack:
[info]  - object not serializable (class: scalapb.lenses.Lens$$anon$1, value: scalapb.lenses.Lens$$anon$1@2efd8702)
[info]  - field (class: scalapb.GeneratedExtension, name: lens, type: interface scalapb.lenses.Lens)
[info]  - object (class scalapb.GeneratedExtension, GeneratedExtension(scalapb.lenses.Lens$$anon$1@2efd8702))
[info]  - field (class: com.example.protos.extensions.Baz$, name: bar, type: class scalapb.GeneratedExtension)
[info]  - object (class com.example.protos.extensions.Baz$, com.example.protos.extensions.Baz$@628905ca)

@thesamet
Copy link
Contributor

Since the test fail for Scala 0.10.x and succeed for the newest ScalaPB (to be released), we need to add a mechanism to enable tests that only run for some version combinations in the matrix.

@jckegelman
Copy link
Author

I updated build.sbt to filter out the new test for ScalaPB 0.10.x using Tests.Filter, let me know if that doesn't work for you.

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