You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@thrift.apache.org by GitBox <gi...@apache.org> on 2022/09/21 06:31:55 UTC

[GitHub] [thrift] kinoroy commented on a diff in pull request #2670: Thrift 4547: Add Swift cross tests

kinoroy commented on code in PR #2670:
URL: https://github.com/apache/thrift/pull/2670#discussion_r976084336


##########
lib/java/src/test/java/org/apache/thrift/server/ServerTestBase.java:
##########
@@ -246,7 +246,7 @@ public Map<Long, Map<Numberz, Insanity>> testInsanity(Insanity argument) {
       first_map.put(Numberz.TWO, argument);
       first_map.put(Numberz.THREE, argument);
 
-      Insanity looney = new Insanity();
+      Insanity looney = new Insanity(new HashMap<>(), Arrays.asList());

Review Comment:
   Yes, since this field is marked as non-optional in the TestThrift.thrift spec, the Swift generator makes them required fields in Swift for deserialization.  I'm not sure if this is the intended behaviour, maybe "non-optional" fields should be mapped to optionals in Swift since they can apparently be omitted by servers according to the spec for "default requiredness".  We could just comment out the insanity test for now until changes are made to the Swift generator to be more compliant with the spec 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@thrift.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org