avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doug Cutting (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AVRO-779) Add Test for retention of schema metadata in schema serialization
Date Wed, 09 Mar 2011 21:33:59 GMT

    [ https://issues.apache.org/jira/browse/AVRO-779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13004805#comment-13004805
] 

Doug Cutting commented on AVRO-779:
-----------------------------------

testRecord includes:
{code}
    assertEquals("bar", Schema.parse(schema.toString())
                 .getField("f").getProp("foo"));
{code}
checkProp() includes:
{code}
    Schema s2 = Schema.parse(s1.toString());
    assertEquals("bar", s2.getProp("foo"));
{code}
Those wouldn't succeed if the property wasn't in the string, would they?

> Add Test for retention of schema metadata in schema serialization
> -----------------------------------------------------------------
>
>                 Key: AVRO-779
>                 URL: https://issues.apache.org/jira/browse/AVRO-779
>             Project: Avro
>          Issue Type: Test
>          Components: java
>    Affects Versions: 1.4.1
>         Environment: All
>            Reporter: Milind Bhandarkar
>            Assignee: Milind Bhandarkar
>            Priority: Minor
>             Fix For: 1.5.1
>
>         Attachments: avro-779.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> Schema metadata (i.e. non-avro metadata) must be retained in the string serialization
(toString) of Schema. The forthcoming patch adds a test to TestSchema that ensures this retention.
Basically, it tests for the invariant:
> <code>
> assertEquals(schema, Schema.parse(schema.toString()));
> </code>

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message