File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -208,13 +208,12 @@ func TestWrapToolHandler_SchemaGenerationError_CanceledContext(t *testing.T) {
208208
209209 // When applyJqSchema fails (lines 724-726), lines 729-734 return the original
210210 // result and data rather than a PayloadMetadata struct.
211- _ , isMetadata := data .(PayloadMetadata )
212- if isMetadata {
213- // gojq completed before checking the cancelled context (fast execution).
214- // In this case the schema was generated successfully and we got metadata —
215- // the schema-error path was not triggered. This is a valid fast-execution
216- // outcome; skip the remaining assertions.
217- t .Skip ("gojq completed before context check; schema error path not triggered (fast execution)" )
211+ meta , ok := data .(PayloadMetadata )
212+ if ok {
213+ // Schema generation succeeded despite the canceled context; validate basic metadata fields.
214+ assert .NotEmpty (t , meta .PayloadPath )
215+ assert .NotNil (t , meta .PayloadSchema )
216+ return
218217 }
219218
220219 // Schema generation failed → original result returned.
You can’t perform that action at this time.
0 commit comments