rahil-c commented on code in PR #9782:
URL: https://github.com/apache/iceberg/pull/9782#discussion_r1566583155


##########
core/src/test/java/org/apache/iceberg/rest/responses/TestListNamespacesResponse.java:
##########
@@ -34,7 +34,7 @@ public class TestListNamespacesResponse extends 
RequestResponseTestBase<ListName
 
   @Test
   public void testRoundTripSerDe() throws JsonProcessingException {
-    String fullJson = "{\"namespaces\":[[\"accounting\"],[\"tax\"]]}";
+    String fullJson = 
"{\"namespaces\":[[\"accounting\"],[\"tax\"]],\"next-page-token\":null}";

Review Comment:
   @nastra Yea I think i see what you mean now, the test calls this at the end
   ```
     protected void assertRoundTripSerializesEquallyFrom(String json, T 
expected)
         throws JsonProcessingException {
       // Check that the JSON deserializes into the expected value;
       T actual = deserialize(json);
       assertEquals(actual, expected);
   
       // Check that the deserialized value serializes back into the original 
JSON
       Assertions.assertThat(serialize(expected)).isEqualTo(json);
     }
   ```
   
   The issue seems to be occuring at this 
`Assertions.assertThat(serialize(expected)).isEqualTo(json);` since when we 
call the `serialize(expected)`  it does not go back to the original string json 
`"{"identifiers":[{"namespace":["accounting","tax"],"name":"paid"}]}"`  and 
instead takes the shape of the ListNameSpacesResponse(which now has the 
nextPageToken field).
   
   Im not sure what we can do here besides either modify the json the test 
expects, or we need to to add another ListNameSpacesResponse class that 
contains a page token field(which seems not ideal)?
   



-- 
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: issues-unsubscr...@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to