[
https://issues.apache.org/jira/browse/AVRO-230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12780693#action_12780693
]
Doug Cutting commented on AVRO-230:
-----------------------------------
> I'd vote for a "valid_schemas" directory too.
The valid_data directory has valid schemas. Is that enough?
In valid_data/binary_data, should each file contain just a single serialized
object with no headers, etc, or should it be a data file? My hunch is it
should be a single object, and that we should have a separate valid_data_files
directory.
To support validation, we could store a random seed in data file's metadata.
Then a validator can read the file while generating random objects from the
seed and schema and check that the two match.
> We should probably do the same thing for valid/invalid protocols.
+1 We might also inlclude valid requests and responses.
> Create a shared schema test directory structure
> -----------------------------------------------
>
> Key: AVRO-230
> URL: https://issues.apache.org/jira/browse/AVRO-230
> Project: Avro
> Issue Type: New Feature
> Components: c, c++, java, python
> Reporter: Matt Massie
> Assignee: Matt Massie
> Fix For: 1.3.0
>
>
> This is an example of my proposed directory structure:
> * invalid_schemas/
> ** broken.json
> ** wrong.json
> * valid_data/
> ** foo_test/
> *** schema.json
> *** json_data/
> **** valid_json_test_data.json
> **** more_valid_json_test_data.json
> *** binary_data/
> **** valid_binary_test_data.bin
> **** more_test_data.bin
> ** bar_test/
> *** schema.json
> *** json_data/
> **** ...
> * invalid_data/
> ** baz_test/
> *** schema.json
> *** json_data/
> **** ...
> *** binary_data/
> **** ...
> This structure supports positive and negative tests for avro schemas, json
> data and binary data.
> * The "invalid_schema" directory holds a number of invalid schemas that
> should fail to parse.
> * The "valid_data" directory has a number of self-contained tests in separate
> directories. Each test directory is required to have a "schema.json" file
> that valid avro schema. The "json_data" and "binary_data" directories are
> optional for each test.
> * The "invalid_data" directory has the same rules as the "valid_data"
> directory. The data files should fail during tests (negative testing).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.