Skip to content

Commit

Permalink
add panic for invalid bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
shaspitz committed Sep 18, 2023
1 parent 3ea0cf4 commit 6e4768e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/e2e/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,10 @@ func (tr TestRun) getPendingPacketQueueSize(chain chainID) uint {
log.Fatal(err, "\n", string(bz))
}

if !gjson.ValidBytes(bz) {
panic("invalid json response from query ccvconsumer throttle-state: " + string(bz))
}

packetData := gjson.Get(string(bz), "packet_data_queue").Array()
return uint(len(packetData))
}
Expand Down

0 comments on commit 6e4768e

Please sign in to comment.