tzuan16 commented on code in PR #575:
URL: https://github.com/apache/polaris/pull/575#discussion_r1889749459
##########
polaris-service/src/test/java/org/apache/polaris/service/catalog/TestUtil.java:
##########
@@ -140,7 +140,10 @@ public static RESTCatalog createSnowmanManagedCatalog(
.header("Authorization", "Bearer " + adminToken.token())
.header(REALM_PROPERTY_KEY, realm)
.get()) {
- assertThat(response).returns(Response.Status.OK.getStatusCode(),
Response::getStatus);
+ // Buffer the entity so we can read it multiple times
+ response.bufferEntity();
Review Comment:
That makes sense. Agree on the point that the caller of the helper method is
not responsible of buffering the entity since the helper method should operate
on the assumption that the response entity would be read multiple times.
Updated the code to accommodate this.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]