mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 01:07:18 +03:00
kvutils: Print state updates before and after normalization. (#11096)
On integrity check failure. This makes it easier to debug failures, as normalization can make the state update mostly useless. CHANGELOG_BEGIN CHANGELOG_END
This commit is contained in:
parent
be216aa872
commit
d64d965230
@ -89,15 +89,31 @@ object ReadServiceStateUpdateComparison {
|
||||
)
|
||||
|
||||
if (expectedNormalizedUpdate != actualNormalizedUpdate) {
|
||||
Future.failed(
|
||||
new ComparisonFailureException(
|
||||
"State update mismatch.",
|
||||
"Expected:",
|
||||
expectedNormalizedUpdate.toString,
|
||||
"Actual:",
|
||||
actualNormalizedUpdate.toString,
|
||||
if (expectedNormalizedUpdate == expectedUpdate && actualNormalizedUpdate == actualUpdate) {
|
||||
Future.failed(
|
||||
new ComparisonFailureException(
|
||||
"State update mismatch.",
|
||||
"Expected:",
|
||||
expectedNormalizedUpdate.toString,
|
||||
"Actual:",
|
||||
actualNormalizedUpdate.toString,
|
||||
)
|
||||
)
|
||||
)
|
||||
} else {
|
||||
Future.failed(
|
||||
new ComparisonFailureException(
|
||||
"State update mismatch.",
|
||||
"Expected (before normalization):",
|
||||
expectedUpdate.toString,
|
||||
"Expected (after normalization):",
|
||||
expectedNormalizedUpdate.toString,
|
||||
"Actual (before normalization):",
|
||||
actualUpdate.toString,
|
||||
"Actual (after normalization):",
|
||||
actualNormalizedUpdate.toString,
|
||||
)
|
||||
)
|
||||
}
|
||||
} else {
|
||||
Future.unit
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user