Revanth14 commented on code in PR #1324:
URL: https://github.com/apache/iceberg-go/pull/1324#discussion_r3496669547
##########
catalog/rest/scan_planning_test.go:
##########
@@ -94,3 +183,298 @@ func TestPlanTableScanResponseRejectsUnknownStatus(t
*testing.T) {
err := json.Unmarshal([]byte(`{"status":"bogus"}`), &resp)
require.ErrorIs(t, err, ErrRESTError)
}
+
+func TestFetchPlanningResultResponseRejectsMalformedResponses(t *testing.T) {
Review Comment:
Addressed.
Added direct coverage that `FetchPlanningResultResponse.UnmarshalJSON`
accepts `{"status":"cancelled"}` and sets `PlanStatusCancelled`.
Also added real client-path coverage for terminal poll results:
`FetchPlanningResult` now has round-trip cases for both `cancelled` and
`failed`. `cancelled` returns `ErrPlanCancelled`, and `failed` returns
`*PlanFailedError`, so those terminal states are exercised through the HTTP
client path rather than only direct JSON unmarshalling.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]