Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
aerfrei committed Dec 23, 2024
1 parent 20bf510 commit 675daa6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkg/ccl/changefeedccl/testfeed_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1233,7 +1233,6 @@ func extractFieldFromJSONValue(
return nil, nil, errors.Wrapf(err, "unmarshalling json %v", metaVal)
}
field = meta[fieldName]
delete(meta, fieldName)
if len(meta) == 0 {
delete(parsed, metaSentinel)
} else {
Expand All @@ -1245,7 +1244,6 @@ func extractFieldFromJSONValue(
}
} else {
field = parsed[fieldName]
delete(parsed, fieldName)
}

if value, err = reformatJSON(parsed); err != nil {
Expand Down Expand Up @@ -2301,11 +2299,11 @@ func (f *webhookFeed) Next() (*cdctest.TestFeedMessage, error) {
if resolved {
m.Resolved = []byte(msg)
} else {
wrappedValue, err := extractValueFromJSONMessage([]byte(msg))
m.Value, err = extractValueFromJSONMessage([]byte(msg))
if err != nil {
return nil, err
}
if m.Key, m.Value, err = extractKeyFromJSONValue(f.isBare, wrappedValue); err != nil {
if m.Key, m.Value, err = extractKeyFromJSONValue(f.isBare, m.Value); err != nil {
return nil, err
}
if m.Topic, m.Value, err = extractTopicFromJSONValue(f.isBare, m.Value); err != nil {
Expand Down

0 comments on commit 675daa6

Please sign in to comment.