[
https://issues.apache.org/jira/browse/SCB-2893?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17903540#comment-17903540
]
Weronika Trzaska commented on SCB-2893:
---------------------------------------
I have a proposed fix that I will be submitting a PR for review.
> 2 Flaky tests in TestSchemaToProtoGenerator
> -------------------------------------------
>
> Key: SCB-2893
> URL: https://issues.apache.org/jira/browse/SCB-2893
> Project: Apache ServiceComb
> Issue Type: Bug
> Components: Java-Chassis
> Reporter: Weronika Trzaska
> Priority: Trivial
>
> org.apache.servicecomb.codec.protobuf.schema.TestSchemaToProtoGenerator.testListMapTypeCorrect
> org.apache.servicecomb.codec.protobuf.schema.TestSchemaToProtoGenerator.test_springmvc_model_schema_correct
>
> The mentioned tests may non-deterministically pass or fail without changes
> made to the source code when it is run in different JVMs due to the inherent
> unordered nature of the fields within the message part of the schema being
> tested.
>
> The first test expects part of the schema to be:
> message DeptInfo {
> string name = 1;
> string code = 2;
> repeated ScoreInfo scores = 3;
> }
>
> But it will sometimes return part of the schema as:
> message DeptInfo {
> string name = 1;
> repeated ScoreInfo scores = 2;
> string code = 3;
> }
> or
> message DeptInfo {
> string code = 1;
> string name = 2;
> repeated ScoreInfo scores = 3;
> }
>
> The second test expects part of the schema to be:
> message Model {
> string name = 1;
> sint32 age = 2;
> }
>
> But it will sometimes return part of the schema as:
> message Model {
> sint32 age = 1;
> string name = 2;
> }
--
This message was sent by Atlassian Jira
(v8.20.10#820010)